QTfrontend/CMakeLists.txt
changeset 7267 710f3ced8934
parent 7152 f49254ddfc67
parent 7256 5b97b9946cde
child 7687 c73fd8cfa7c0
--- a/QTfrontend/CMakeLists.txt	Tue Jun 19 21:17:05 2012 +0200
+++ b/QTfrontend/CMakeLists.txt	Tue Jun 19 21:20:08 2012 +0200
@@ -11,7 +11,9 @@
 set(QT_USE_QTMAIN TRUE)
 
 find_package(Qt4 REQUIRED)
-include(${QT_USE_FILE})
+if (NOT CROSSAPPLE)
+    include(${QT_USE_FILE})
+endif()
 
 # Check if we need zlib
 check_library_exists("${QT_QTCORE_LIBRARY}" inflateInit2_ ${QT_LIBRARY_DIR} QT_PROVIDES_ZLIB_FUNCTIONS)
@@ -139,7 +141,7 @@
 qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs})
 
 
-if(APPLE)
+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})
 
@@ -185,7 +187,11 @@
 endif()
 
 
-target_link_libraries(hedgewars ${HW_LINK_LIBS})
+if (CROSSAPPLE)
+    add_dependencies(hedgewars quazip)
+else()
+    target_link_libraries(hedgewars ${HW_LINK_LIBS})
+endif()
 
 
 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})