comparison src/CMakeLists.txt @ 1:93d3106bb9a4

Add qt xlsx library
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 22 Mar 2016 10:38:08 +0100
parents 49cd5cc0b072
children 7f26b0293e1d
comparison
equal deleted inserted replaced
0:49cd5cc0b072 1:93d3106bb9a4
1 # Copyright (C) 2016 by ETH Zürich
2 # Software engineering by Intevation GmbH
3 #
4 # This file is Free Software under the GNU GPL (v>=2)
5 # and comes with ABSOLUTELY NO WARRANTY!
6 # See LICENSE.txt for details.
7
8 include_directories(${Qt5Core_INCLUDE_DIRS})
9
10 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
11
12 add_subdirectory(xlsx)
13 include_directories(xlsx)
14
15 set(APPLICATION_SRC
16 main.cpp
17 converter.cpp
18 strhelp.c
19 )
20
21 find_package(Qt5LinguistTools)
22
23 if(Qt5LinguistTools_FOUND)
24
25 set(FILES_TO_TRANSLATE
26 ${APPLICATION_SRC}
27 )
28
29 # Include translation as a resource
30 # This works in the source directory to enable the rcc dependencies to be found
31 # and it also updates the currently available localization.
32 configure_file(l10n/l10n.qrc.in l10n.qrc)
33 qt5_add_resources(APPLICATION_SRC ${CMAKE_CURRENT_BINARY_DIR}/l10n.qrc)
34 qt5_create_translation(TRANSLATION_SRC ${FILES_TO_TRANSLATE}
35 ${CMAKE_CURRENT_SOURCE_DIR}/l10n/main_de_DE.ts)
36 endif()
37
38
39 add_executable(${PROJECT_NAME}
40 ${_add_executable_params}
41 ${APPLICATION_SRC}
42 ${TRANSLATION_SRC}
43 )
44
45 target_link_libraries(${PROJECT_NAME}
46 Qt5::Core
47 Qt5::Gui
48 ${PROJECT_NAME}_libqtxslx
49 )
50
51 if (WIN32)
52 set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-municode")
53 endif(WIN32)
54
55 install(TARGETS ${PROJECT_NAME} DESTINATION bin BUNDLE DESTINATION .)
56
57 if(APPLE)
58 install(CODE "
59 include(BundleUtilities)
60 fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
61 " COMPONENT Runtime)
62 endif()
63 set(CPACK_BINARY_DRAGNDROP ON)
64 include(CPack)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)