As some of you might know (kurosu? ;), the build process on mac could be 
a little long. When I wrote it, I said it was because of libxml++ which 
had tons of dependencies. So, now that libxml++ was removed as a 
dependency (great!), I played around with a new build system that would 
be very quick and easy to use. I based it around cmake since I am not 
comfortable with autotools.

To get this new build system done, I'd need two things (feedback please)

1) i'd like to upload a package containing pre-built dependencies to Gna 
or SVN or whereever you deem it appropriate (when zipped it's below 5 mb)

2) I'd need the following patch applied to CMake build files (I have SVN 
commit rights so I could commit it but I'd like it to be reviewed first)


Index: cmake/FindSDL_gfx.cmake
===================================================================
--- cmake/FindSDL_gfx.cmake     (revision 4354)
+++ cmake/FindSDL_gfx.cmake     (working copy)
@@ -32,9 +32,9 @@
 IF(${SDLGFX_INCLUDE_DIR} MATCHES ".framework")
   STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" 
SDLGFX_FRAMEWORK_PATH_TEMP ${SDLGFX_INCLUDE_DIR})
   IF("${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/Library/Frameworks" OR 
"${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/System/Library/Frameworks")
-    SET(SDLGFX_LIBRARY_TEMP "-framework SDL_gfx")
+    SET(SDLGFX_LIBRARY "-framework SDL_gfx")
   ELSE("${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/Library/Frameworks" 
OR "${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/System/Library/Frameworks")
-    SET(SDLGFX_LIBRARY_TEMP "-F${SDLGFX_FRAMEWORK_PATH_TEMP} -framework 
SDL_gfx")
+    SET(SDLGFX_LIBRARY "-F${SDLGFX_FRAMEWORK_PATH_TEMP} -framework 
SDL_gfx")
   ENDIF("${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/Library/Frameworks" 
OR "${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/System/Library/Frameworks")
   SET(SDLGFX_FRAMEWORK_PATH_TEMP "" CACHE INTERNAL "")
 ELSE(${SDLGFX_INCLUDE_DIR} MATCHES ".framework")
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt      (revision 4354)
+++ CMakeLists.txt      (working copy)
@@ -55,14 +55,25 @@
 FIND_PACKAGE(SDL_gfx REQUIRED)
 FIND_PACKAGE(SDL_net REQUIRED)
 FIND_PACKAGE(LibXml2 REQUIRED)
-FIND_PACKAGE(PNG REQUIRED)
 FIND_PACKAGE(CURL REQUIRED)
+
+IF(APPLE)
+  # to ease packaging, we'll use a static libintl
+  # we also need to link against the SDL_main library (required by the 
mac version of SDL)
+  SET(WORMUX_LDFLAGS "${PROJECT_SOURCE_DIR}/libintl.a -liconv 
-framework Carbon -L${PROJECT_SOURCE_DIR} -lSDLmain_UB ${WORMUX_LDFLAGS}")
+  # to ease packaging, we'll use a framework version of libpng
+  # (with a different name so there is no confusion with the UNIX 
version of libpng)
+  SET(WORMUX_LDFLAGS "-framework wmxlibpng 
-I/Library/Frameworks/wmxlibpng.framework/Headers/ ${WORMUX_LDFLAGS}")
+ELSE(APPLE)
+  FIND_PACKAGE(PNG REQUIRED)
+ENDIF(APPLE)
+
+
 ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})


The first one is that the SDL_gfx detection code did not set the right 
variable on mac.
The second patch is more specific to my build method - however I could 
document it on the wiki so I don't think it would cause any issues.



_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à