diff CMakeLists.txt @ 19:e85455ff6039

standalon
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Jul 2012 10:17:12 +0200
parents c38716a8a146
children 1bc6327d1de3
line wrap: on
line diff
--- a/CMakeLists.txt	Tue Jul 24 10:03:17 2012 +0200
+++ b/CMakeLists.txt	Tue Jul 24 10:17:12 2012 +0200
@@ -6,9 +6,13 @@
 include(CheckIncludeFiles)
 
 SET(STATIC_BUILD ON CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
-SET(RELEASE_BUILD OFF CACHE BOOL "Release build")
+SET(STANDALONE_BUILD OFF CACHE BOOL "Standalone build (necessary for cross-compilation or binary releases)")
 
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (${CMAKE_CROSSCOMPILING})
+  SET(STANDALONE_BUILD ON)
+endif()
+
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   CHECK_INCLUDE_FILES(rpc.h HAVE_UUID_H)
 else()
   CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
@@ -85,9 +89,9 @@
   add_definitions(-DPALANTIR_STATIC=0)
 endif()
 
-if (${RELEASE_BUILD})
+if (${STANDALONE_BUILD})
   add_definitions(
-    -DPALANTIR_RELEASE=1
+    -DPALANTIR_STANDALONE=1
     )
 
   EmbedResources(
@@ -97,7 +101,7 @@
 
 else()
   add_definitions(
-    -DPALANTIR_RELEASE=0
+    -DPALANTIR_STANDALONE=0
     -DPALANTIR_PATH=\"${CMAKE_SOURCE_DIR}\"
     )