--- a/gameServer/CMakeLists.txt Sun Jun 28 16:44:04 2009 +0000
+++ b/gameServer/CMakeLists.txt Sun Jun 28 16:54:51 2009 +0000
@@ -29,6 +29,21 @@
-odir ${CMAKE_CURRENT_BINARY_DIR}
-hidir ${CMAKE_CURRENT_BINARY_DIR})
+if( NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES "Release")
+set(ghc_flags
+ -w
+ -O2
+ ${ghc_flags}
+)
+else()
+set(ghc_flags
+ -Wall
+ -debug
+ -dcore-lint
+ ${ghc_flags}
+)
+endif()
+
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
COMMAND "${ghc_executable}"
ARGS ${ghc_flags}
@@ -38,11 +53,4 @@
add_custom_target(hedgewars-server ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}")
-
-if(APPLE)
- set (target_dir ".")
-else(APPLE)
- set (target_dir "bin")
-endif(APPLE)
-
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})