comparison src/CMakeLists.txt @ 46:11618dd45312

Add MacOS build support
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 30 May 2016 14:02:04 +0200
parents 50dae38a5641
children 36ee5dd46fd3
comparison
equal deleted inserted replaced
45:87814487eb18 46:11618dd45312
41 ${_add_executable_params} 41 ${_add_executable_params}
42 ${APPLICATION_SRC} 42 ${APPLICATION_SRC}
43 ${TRANSLATION_SRC} 43 ${TRANSLATION_SRC}
44 ) 44 )
45 45
46 # See: https://bugreports.qt-project.org/browse/QTBUG-35918
47 # extra static libs should be automatically managed but they
48 # are not so we make this here explicitly neccessary.
49 # The list is taken from the libs/*.prl file
50 if(APPLE)
51 set(GUI_TYPE MACOSX_BUNDLE)
52 include_directories ( /Developer/Headers/FlatCarbon )
53 find_library(COCOA_LIBRARAY Cocoa)
54 find_library(CARBON_LIBRARY Carbon)
55 find_library(APP_SERVICES_LIBRARY ApplicationServices)
56 find_library(FOUNDATION_LIBRARAY Foundation)
57 find_library(CORE_SERVICES_LIBRARAY CoreServices)
58 find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
59 find_library(OPENGL_LIBRARAY OpenGL)
60 find_library(AGL_LIBRARY AGL)
61 find_library(IOKIT_LIBRARY IOKit)
62
63 get_target_property(_loc Qt5::Widgets LOCATION)
64 get_filename_component(_qtpath ${_loc} PATH)
65
66 set(MAC_EXTRA_LIBS
67 -L${_qtpath}
68 -lQt5Gui -lQt5Core -lQt5PlatformSupport
69 -lQt5PrintSupport
70 -lz -lm ${APP_SERVICES_LIBRARY}
71 ${FOUNDATION_LIBRARAY}
72 ${CORE_FOUNDATION_LIBRARY}
73 ${COCOA_LIBRARAY}
74 ${CORE_SERVICES_LIBRARAY}
75 ${OPENGL_LIBRARAY}
76 ${AGL_LIBRARY}
77 ${CARBON_LIBRARY}
78 ${IOKIT_LIBRARY}
79 -lqtharfbuzzng -lz -lcups)
80 set(EXTRA_STATIC_LIBS Qt5::QCocoaIntegrationPlugin ${MAC_EXTRA_LIBS} )
81 set (_add_executable_params MACOSX_BUNDLE)
82 SET(APPS "\${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app")
83 SET(MACOS_INFO_STRING "Tool to convert EduApp questionaires.")
84 SET(MACOSX_BUNDLE_NAME "EduExportConvert")
85 SET(MACOSX_BUNDLE_GUI_IDENTIFIER "EduExportConvert")
86 SET(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
87 SET(MACOSX_BUNDLE_BUNDLE_VERSION_STRING "${PROJECT_VERSION}")
88 SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}")
89 SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}")
90 set(MACOSX_BUNDLE_COPYRIGHT "Copyright (C) 2016 by ETH Zürich\nSoftware engineering by Intevation GmbH")
91 endif()
92
46 if (WIN32) 93 if (WIN32)
47 get_target_property(_loc Qt5::Widgets LOCATION) 94 get_target_property(_loc Qt5::Widgets LOCATION)
48 get_filename_component(_qtpath ${_loc} PATH) 95 get_filename_component(_qtpath ${_loc} PATH)
49 set(EXTRA_STATIC_LIBS 96 set(EXTRA_STATIC_LIBS
50 -L${_qtpath} 97 -L${_qtpath}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)