fix mac compilation 0.9.16
authorkoda
Mon, 19 Sep 2011 19:12:19 +0200
branch0.9.16
changeset 5963 c24fdd9a0458
parent 5961 b9446e994857
child 5966 a0f38ad66163
child 5995 647d52370ce9
fix mac compilation
QTfrontend/CMakeLists.txt
hedgewars/CMakeLists.txt
--- a/QTfrontend/CMakeLists.txt	Mon Sep 19 14:38:44 2011 +0200
+++ b/QTfrontend/CMakeLists.txt	Mon Sep 19 19:12:19 2011 +0200
@@ -1,5 +1,6 @@
 # Configure for Qt4
 set(QT_MIN_VERSION "4.5.0")
+include(CheckLibraryExists)
 
 set(QT_USE_QTCORE TRUE)
 set(QT_USE_QTGUI TRUE)
--- a/hedgewars/CMakeLists.txt	Mon Sep 19 14:38:44 2011 +0200
+++ b/hedgewars/CMakeLists.txt	Mon Sep 19 19:12:19 2011 +0200
@@ -152,6 +152,9 @@
         MAIN_DEPENDENCY ${hwengine_project}
         DEPENDS ${engine_sources}
         )
+
+    add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars")
+    add_dependencies(${engine_output_name} ENGINECLEAN)
 ELSE()
     #let's build sdlmain, which is absent from the framework
     find_package(SDL REQUIRED)
@@ -183,8 +186,6 @@
 
 
 add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}")
-add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars")
-add_dependencies(${engine_output_name} ENGINECLEAN)
 
 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})