source: src/clientcommandline/CMakeLists.txt@ f8c242e

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

Command line client is now (nearly) able to register a 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 inputoutputhandler.cpp
39 stationsregister.cpp
40)
41
42CONFIGURE_FILE(siweatherclientconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/siweatherclientconfig.h)
43# needed to compile the icon into the exe file
44# the MINGW part is a workaround, since mingw can not handle the rc file
45# (msvc can handle it)
46# IF(WIN32)
47 # IF( MINGW )
48 # resource compilation for MinGW
49 # ADD_CUSTOM_COMMAND(
50 # OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o
51 # COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/epartexe.rc
52 # -o ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o
53 # )
54 # SET(src_CPP ${src_CPP} ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o)
55 # ELSE( MINGW )
56 # SET(src_CPP ${src_CPP} epartexe.rc)
57 # ENDIF( MINGW )
58# ENDIF(WIN32)
59
60
61SET(neededStuff ${src_CPP})
62
63IF(UNIX)
64 ADD_EXECUTABLE(siweatherstation ${neededStuff})
65ELSEIF(APPLE)
66 # it's with gui, so MACOSX_BUNDLE is needed
67 ADD_EXECUTABLE(siweatherstation ${neededStuff})
68ELSEIF(WIN32)
69 # it's with gui, so WIN32 is needed
70 ADD_EXECUTABLE(siweatherstation ${neededStuff})
71 SET_TARGET_PROPERTIES(siweatherstation PROPERTIES DEBUG_POSTFIX d)
72ENDIF()
73
74TARGET_LINK_LIBRARIES(siweatherstation ${LINK_LIBRARIES})
75
76qt5_use_modules(siweatherstation Core)
77
78# The COMPONENT option only defines the internal belonging of the INSTALL'ed thing
79INSTALL(
80 TARGETS siweatherstation
81 RUNTIME DESTINATION ${bin_DIR}
82 COMPONENT application
83)
Note: See TracBrowser for help on using the repository browser.