Permalink
Browse files

Fixed Warning

  • Loading branch information...
1 parent 72526fe commit 74b9a417d9601f31f0dd02446d1ece05b9d61a72 @vlag vlag committed with christopho Jul 8, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 CMakeLists.txt
View
@@ -104,21 +104,21 @@ set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-Werror ${CMAKE_CXX_FLAGS_DEBUG}")
# compilation flags for Mac OS X (Intel) deployment
-if(CMAKE_BUILD_TYPE MATCHES "Release")
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND CMAKE_BUILD_TYPE MATCHES "Release")
if(EXISTS /Developer/SDKs/MacOSX10.5.sdk)
set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk" CACHE STRING "OS version whose headers you'll use" FORCE)
set(CMAKE_OSX_ARCHITECTURES "ppc;i386;x86_64;" CACHE STRING "Compile for these processor architecture" FORCE)
endif()
- if($ENV{MACOSX_DEPLOYMENT_TARGET})
+ if(NOT $ENV{MACOSX_DEPLOYMENT_TARGET} EQUAL "")
set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}" CACHE STRING "The oldest OS version supported" FORCE)
if($ENV{MACOSX_DEPLOYMENT_TARGET} STRGREATER "10.4")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xlinker -rpath -Xlinker @loader_path/../Frameworks/" CACHE STRING "Embed frameworks search path" FORCE)
endif()
if($ENV{MACOSX_DEPLOYMENT_TARGET} STRLESS "10.6")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no_compact_linkedit" CACHE STRING "Disable 10.6+ features if deploy on older version" FORCE)
endif()
- endif()
-endif(CMAKE_BUILD_TYPE MATCHES "Release")
+ endif(NOT $ENV{MACOSX_DEPLOYMENT_TARGET} EQUAL "")
+endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND CMAKE_BUILD_TYPE MATCHES "Release")
# solarus options
option(DEBUG_KEYS "Enable the debugging keys." OFF)

0 comments on commit 74b9a41

Please sign in to comment.