--- a/CMakeLists.txt Sun Nov 29 21:47:47 2009 +0000
+++ b/CMakeLists.txt Mon Nov 30 04:18:31 2009 +0000
@@ -43,20 +43,16 @@
#create universal binaries only when it's time to bundle the application
IF(BUNDLE)
if(current_macosx_version MATCHES "10.6")
- set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400")
- set(build_x86_64 TRUE)
- set(build_i386 TRUE)
- set(build_ppc TRUE)
+ set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400")
else()
set(CMAKE_OSX_ARCHITECTURES "i386;ppc7400")
- set(build_i386 TRUE)
- set(build_ppc TRUE)
endif()
- ELSE()
- set(build_i386 TRUE)
+ ELSEIF(NOT CMAKE_OSX_ARCHITECTURES)
+ EXEC_PROGRAM("/usr/bin/uname" ARGS "-p" OUTPUT_VARIABLE ARCH_TYPE)
+ set(CMAKE_OSX_ARCHITECTURES "${ARCH_TYPE}")
ENDIF()
- message(STATUS "Target system: Mac OS X ${minimum_macosx} for ${CMAKE_OSX_ARCHITECTURES}")
+ message(STATUS "Target system: Mac OS X ${minimum_macosx} ${CMAKE_OSX_ARCHITECTURES}")
if(minimum_macosx MATCHES "10.4")
set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk/")
@@ -96,6 +92,10 @@
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
set(pascal_compiler_flags_cmn "-B" "-FE../bin" "-Fl../bin/" "-Cs2000000" "-vwi")
+if(LOWRES)
+ set(pascal_compiler_flags_cmn "-dLOWRES" ${pascal_compiler_flags_cmn})
+ add_definitions(-DLOWRES)
+endif(LOWRES)
if(Optz)
set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
@@ -108,9 +108,9 @@
if(DEFINED DATA_INSTALL_DIR)
set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)
-else(DEFINED DATA_INSTALL_DIR)
+else()
set(SHAREPATH share/hedgewars/)
-endif(DEFINED DATA_INSTALL_DIR)
+endif()
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")