comparison src/CMakeLists.txt @ 60:af8f1792d48d

Add App bundle installation
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 19 May 2015 16:14:04 +0200
parents 2cd76e6c0fcf
children 1129d49b9baf
comparison
equal deleted inserted replaced
59:72e5a9c8e7e1 60:af8f1792d48d
62 ${CARBON_LIBRARY} 62 ${CARBON_LIBRARY}
63 ${IOKIT_LIBRARY} 63 ${IOKIT_LIBRARY}
64 -lqtharfbuzzng -lz -lcups) 64 -lqtharfbuzzng -lz -lcups)
65 set(EXTRA_STATIC_LIBS Qt5::QCocoaIntegrationPlugin ${MAC_EXTRA_LIBS} ) 65 set(EXTRA_STATIC_LIBS Qt5::QCocoaIntegrationPlugin ${MAC_EXTRA_LIBS} )
66 66
67 SET(MACOSX_BUNDLE_ICON_FILE icon.icns)
68 SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
69 SET(APPLICATION_SRC ${APPLICATION_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns)
70 set (_add_executable_params MACOSX_BUNDLE)
71 SET(APPS "\${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app")
67 elseif(WIN32) 72 elseif(WIN32)
68 set (_add_executable_params WIN32) 73 set (_add_executable_params WIN32)
69 74
70 get_target_property(_loc Qt5::Widgets LOCATION) 75 get_target_property(_loc Qt5::Widgets LOCATION)
71 get_filename_component(_qtpath ${_loc} PATH) 76 get_filename_component(_qtpath ${_loc} PATH)
121 126
122 if (WIN32) 127 if (WIN32)
123 set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-municode") 128 set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-municode")
124 endif(WIN32) 129 endif(WIN32)
125 130
126 install(TARGETS ${PROJECT_NAME} DESTINATION bin) 131 install(TARGETS ${PROJECT_NAME} DESTINATION bin BUNDLE DESTINATION .)
132 INSTALL(CODE "
133 include(BundleUtilities)
134 fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
135 " COMPONENT Runtime)
136
137 set(CPACK_BINARY_DRAGNDROP ON)
138 include(CPack)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)