[Supertux-Commit] r5171 - trunk/supertux

tuxdev at millhouse.dreamhost.com tuxdev at millhouse.dreamhost.com
Fri Nov 2 09:52:28 PDT 2007


Author: tuxdev
Date: 2007-11-02 09:52:27 -0700 (Fri, 02 Nov 2007)
New Revision: 5171

Modified:
   trunk/supertux/CMakeLists.txt
Log:
Use OPTION for configuration options and set EXECUTABLE_OUTPUT_PATH to put the binary in the right place

Modified: trunk/supertux/CMakeLists.txt
===================================================================
--- trunk/supertux/CMakeLists.txt	2007-10-27 22:38:12 UTC (rev 5170)
+++ trunk/supertux/CMakeLists.txt	2007-11-02 16:52:27 UTC (rev 5171)
@@ -48,12 +48,12 @@
 
 ## Some default settings
 
-set(DEBUG 0 CACHE BOOL "Build with debugging options")
-set(ENABLE_BINRELOC 0 CACHE BOOL "Enable autopackage's BINRELOC features")
-set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "APPDATADIR for autopackage's BINRELOC features")
-set(ENABLE_SQDBG 0 CACHE BOOL "Build squirrel script interpreter with debugging options")
-set(ENABLE_OPENGL 1 CACHE BOOL "Enable OpenGL support")
-set(GENERATE_WRAPPER ${DEBUG} CACHE BOOL "Build miniswig and generate the wrapper")
+OPTION(DEBUG "Build with debugging options" FALSE)
+OPTION(ENABLE_BINRELOC "Enable autopackage's BINRELOC features" FALSE)
+OPTION(APPDATADIR "APPDATADIR for autopackage's BINRELOC features" "${CMAKE_INSTALL_PREFIX}/share")
+OPTION(ENABLE_SQDBG "Build squirrel script interpreter with debugging options" FALSE)
+OPTION(ENABLE_OPENGL "Enable OpenGL support" TRUE)
+OPTION(GENERATE_WRAPPER "Build miniswig and generate the wrapper" ${DEBUG})
 
 ## Search here for additional cmake modules (for finding deps)
 
@@ -170,6 +170,10 @@
 
 ADD_DEFINITIONS(-O2 -fno-strict-aliasing)
 
+## Generate supertux executable in the right place
+
+SET(EXECUTABLE_OUTPUT_PATH ${SUPERTUX_SOURCE_DIR})
+
 ## Add target for supertux binary
 
 ADD_EXECUTABLE(supertux2 ${SUPERTUX_SOURCES})
@@ -178,15 +182,6 @@
 
 TARGET_LINK_LIBRARIES(supertux2 squirrel)
 
-## After building, copy binary to source root
-
-ADD_CUSTOM_COMMAND(
-  TARGET supertux2
-  POST_BUILD
-  COMMAND ${CMAKE_COMMAND}
-  ARGS -E copy supertux2 ${SUPERTUX_SOURCE_DIR}/supertux2
-)
-
 ## Install stuff
 
 INSTALL(TARGETS supertux2 DESTINATION bin)



More information about the Supertux-Commit mailing list