QTfrontend/CMakeLists.txt
branchflibqtfrontend
changeset 8304 620560c89284
parent 8278 9cdfcb5b7ddd
parent 8283 af97cdbb7713
child 8363 0b4ac686fc44
--- a/QTfrontend/CMakeLists.txt	Sun Dec 16 12:05:32 2012 +0400
+++ b/QTfrontend/CMakeLists.txt	Sun Dec 16 12:25:13 2012 +0400
@@ -96,9 +96,9 @@
 if(MINGW)
     # resource compilation for mingw
     add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o
-    COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR}
-    -i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc
-    -o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
+                       COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR}
+                               -i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc
+                               -o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
     set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
 else(MINGW)
     set(hwfr_src ${hwfr_src} hedgewars.rc)
@@ -144,9 +144,14 @@
 
 
 if(APPLE OR CROSSAPPLE)
-    set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
-    set(HW_LINK_LIBS IOKit ${HW_LINK_LIBS})
-
+    find_library(iokit_framework NAMES IOKit)
+    set(HW_LINK_LIBS ${iokit_framework} ${HW_LINK_LIBS})
+    set(hwfr_src ${hwfr_src} CocoaInitializer.mm
+                             InstallController.cpp
+                             M3Panel.mm
+                             M3InstallController.m
+                             NSWorkspace_RBAdditions.m
+                             )
     if(NOT NOAUTOUPDATE)
         find_package(Sparkle)
         if(SPARKLE_FOUND)
@@ -203,9 +208,7 @@
 endif()
 
 
-if (CROSSAPPLE)
-
-else()
+if (NOT CROSSAPPLE)
     target_link_libraries(hedgewars ${HW_LINK_LIBS})
 endif()