QTfrontend/CMakeLists.txt
changeset 7267 710f3ced8934
parent 7152 f49254ddfc67
parent 7256 5b97b9946cde
child 7687 c73fd8cfa7c0
equal deleted inserted replaced
7234:613998625a3c 7267:710f3ced8934
     9 set(QT_USE_QTXML FALSE)
     9 set(QT_USE_QTXML FALSE)
    10 set(QT_USE_QTOPENGL FALSE)
    10 set(QT_USE_QTOPENGL FALSE)
    11 set(QT_USE_QTMAIN TRUE)
    11 set(QT_USE_QTMAIN TRUE)
    12 
    12 
    13 find_package(Qt4 REQUIRED)
    13 find_package(Qt4 REQUIRED)
    14 include(${QT_USE_FILE})
    14 if (NOT CROSSAPPLE)
       
    15     include(${QT_USE_FILE})
       
    16 endif()
    15 
    17 
    16 # Check if we need zlib
    18 # Check if we need zlib
    17 check_library_exists("${QT_QTCORE_LIBRARY}" inflateInit2_ ${QT_LIBRARY_DIR} QT_PROVIDES_ZLIB_FUNCTIONS)
    19 check_library_exists("${QT_QTCORE_LIBRARY}" inflateInit2_ ${QT_LIBRARY_DIR} QT_PROVIDES_ZLIB_FUNCTIONS)
    18 
    20 
    19 if(NOT QT_PROVIDES_ZLIB_FUNCTIONS)
    21 if(NOT QT_PROVIDES_ZLIB_FUNCTIONS)
   137 qt4_add_resources(hwfr_rez_src ${hwfr_rez})
   139 qt4_add_resources(hwfr_rez_src ${hwfr_rez})
   138 
   140 
   139 qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs})
   141 qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs})
   140 
   142 
   141 
   143 
   142 if(APPLE)
   144 if(APPLE OR CROSSAPPLE)
   143     set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
   145     set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
   144     set(HW_LINK_LIBS IOKit ${HW_LINK_LIBS})
   146     set(HW_LINK_LIBS IOKit ${HW_LINK_LIBS})
   145 
   147 
   146     if(NOT NOAUTOUPDATE)
   148     if(NOT NOAUTOUPDATE)
   147         find_package(Sparkle)
   149         find_package(Sparkle)
   183         uuid
   185         uuid
   184         )
   186         )
   185 endif()
   187 endif()
   186 
   188 
   187 
   189 
   188 target_link_libraries(hedgewars ${HW_LINK_LIBS})
   190 if (CROSSAPPLE)
       
   191     add_dependencies(hedgewars quazip)
       
   192 else()
       
   193     target_link_libraries(hedgewars ${HW_LINK_LIBS})
       
   194 endif()
   189 
   195 
   190 
   196 
   191 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})
   197 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})
   192 
   198