source: src/clientcommandline/CMakeLists.txt@ fb602c6

Last change on this file since fb602c6 was fb602c6, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago

Started to implement c++ command line client running on the weather station

  • Property mode set to 100644
File size: 2.5 KB
Line 
1######################
2#
3# Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
4#
5# This library is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# This library is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public
16# License along with this library; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18# MA 02110-1301 USA.
19#
20######################
21
22INCLUDE_DIRECTORIES(
23 ${QT_INCLUDES}
24 ${CMAKE_CURRENT_BINARY_DIR}
25 ${CMAKE_CURRENT_SOURCE_DIR}
26 ${libsiweather_SOURCE_DIR}
27 ${libsiweather_BINARY_DIR}
28 ${LIBENGSAS_INCLUDE_DIR}
29)
30SET(LINK_LIBRARIES
31 ${QT_LIBRARIES}
32 libsiweather
33 ${LIBENGSAS_LIBRARIES}
34)
35
36SET(src_CPP
37 main.cpp
38)
39
40CONFIGURE_FILE(siweatherclientconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/siweatherclientconfig.h)
41# needed to compile the icon into the exe file
42# the MINGW part is a workaround, since mingw can not handle the rc file
43# (msvc can handle it)
44# IF(WIN32)
45 # IF( MINGW )
46 # resource compilation for MinGW
47 # ADD_CUSTOM_COMMAND(
48 # OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o
49 # COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/epartexe.rc
50 # -o ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o
51 # )
52 # SET(src_CPP ${src_CPP} ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o)
53 # ELSE( MINGW )
54 # SET(src_CPP ${src_CPP} epartexe.rc)
55 # ENDIF( MINGW )
56# ENDIF(WIN32)
57
58
59SET(neededStuff ${src_CPP})
60
61IF(UNIX)
62 ADD_EXECUTABLE(siweatherstation ${neededStuff})
63ELSEIF(APPLE)
64 # it's with gui, so MACOSX_BUNDLE is needed
65 ADD_EXECUTABLE(siweatherstation ${neededStuff})
66ELSEIF(WIN32)
67 # it's with gui, so WIN32 is needed
68 ADD_EXECUTABLE(siweatherstation ${neededStuff})
69 SET_TARGET_PROPERTIES(siweatherstation PROPERTIES DEBUG_POSTFIX d)
70ENDIF()
71
72TARGET_LINK_LIBRARIES(siweatherstation ${LINK_LIBRARIES})
73
74qt5_use_modules(siweatherstation Core)
75
76# The COMPONENT option only defines the internal belonging of the INSTALL'ed thing
77INSTALL(
78 TARGETS siweatherstation
79 RUNTIME DESTINATION ${bin_DIR}
80 COMPONENT application
81)
Note: See TracBrowser for help on using the repository browser.