patch by raptor (polished by me) to allow tiger/xcode24 compilation
authorkoda
Mon, 12 Apr 2010 21:51:09 +0000
changeset 3338 dee9beba85cc
parent 3337 75e7455c69ed
child 3339 d558bc5a73c5
patch by raptor (polished by me) to allow tiger/xcode24 compilation
CMakeLists.txt
--- a/CMakeLists.txt	Mon Apr 12 20:58:32 2010 +0000
+++ b/CMakeLists.txt	Mon Apr 12 21:51:09 2010 +0000
@@ -90,6 +90,12 @@
 
 	if(minimum_macosx MATCHES "10.4")
 		set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk/")
+		if(current_macosx_version MATCHES "10.4")
+			find_package(SDL_mixer REQUIRED)
+			set(pascal_compiler_flags_cmn "-k-dylib_file @loader_path/Frameworks/smpeg.framework/Versions/A/smpeg:${SDLMIXER_LIBRARY}/SDL_mixer.framework/Versions/A/Frameworks/smpeg.framework/Versions/A/smpeg" ${pascal_compiler_flags_cmn})
+			set(pascal_compiler_flags_cmn "-k-dylib_file @loader_path/Frameworks/mikmod.framework/Versions/A/mikmod:${SDLMIXER_LIBRARY}/SDL_mixer.framework/Versions/A/Frameworks/mikmod.framework/Versions/A/mikmod" ${pascal_compiler_flags_cmn})
+			set(CMAKE_C_FLAGS "-dylib_file @loader_path/Frameworks/smpeg.framework/Versions/A/smpeg:${SDLMIXER_LIBRARY}/SDL_mixer.framework/Versions/A/Frameworks/smpeg.framework/Versions/A/smpeg -dylib_file @loader_path/Frameworks/mikmod.framework/Versions/A/mikmod:${SDLMIXER_LIBRARY}/SDL_mixer.framework/Versions/A/Frameworks/mikmod.framework/Versions/A/mikmod")
+		endif()
 	else()
 		set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${minimum_macosx}.sdk/")
 	endif()
@@ -122,9 +128,9 @@
 
 
 #set default flags values for all the project
-set(CMAKE_C_FLAGS "-pipe")
-set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer")
-set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG")
+set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}")
+set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
+set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
 set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
 set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
 set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
@@ -157,10 +163,6 @@
 if(WITH_SERVER)
 	set(HAVE_NETSERVER true)
 	add_subdirectory(gameServer)
-	if(APPLE)
-		#workaround for http://hackage.haskell.org/trac/ghc/ticket/3400
-		set(haskell_compiler_flags_cmn ${haskell_compiler_flags_cmn} "-optc-m32" "-opta-m32" "-optl-arch\ i386")
-	endif()
 else(WITH_SERVER)
 	set(HAVE_NETSERVER false)
 endif(WITH_SERVER)
@@ -175,7 +177,7 @@
 
 # CPack vars
 
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hedgewars, a turn-based strategy")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hedgewars, a free turn-based strategy")
 set(CPACK_PACKAGE_VENDOR "Hedgewars Project")
 set(CPACK_PACKAGE_FILE_NAME "hedgewars-${HEDGEWARS_VERSION}")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "hedgewars-src-${HEDGEWARS_VERSION}")
@@ -185,7 +187,7 @@
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "Hedgewars ${HEDGEWARS_VERSION}")
 
 if(WIN32 AND NOT UNIX)
-	set(CPACK_NSIS_DISPLAY_NAME "Hedgewars, a free turn-based strategy game") 
+	set(CPACK_NSIS_DISPLAY_NAME ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) 
 	set(CPACK_NSIS_HELP_LINK "http://www.hedgewars.org/")
 	set(CPACK_NSIS_URL_INFO_ABOUT "http://www.hedgewars.org/")
 	set(CPACK_NSIS_CONTACT "unC0Rr@gmail.com")