| [fb602c6] | 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 |
|
|---|
| 22 | INCLUDE_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 | )
|
|---|
| 30 | SET(LINK_LIBRARIES
|
|---|
| 31 | ${QT_LIBRARIES}
|
|---|
| 32 | libsiweather
|
|---|
| 33 | ${LIBENGSAS_LIBRARIES}
|
|---|
| 34 | )
|
|---|
| 35 |
|
|---|
| 36 | SET(src_CPP
|
|---|
| 37 | main.cpp
|
|---|
| 38 | )
|
|---|
| 39 |
|
|---|
| 40 | CONFIGURE_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 |
|
|---|
| 59 | SET(neededStuff ${src_CPP})
|
|---|
| 60 |
|
|---|
| 61 | IF(UNIX)
|
|---|
| 62 | ADD_EXECUTABLE(siweatherstation ${neededStuff})
|
|---|
| 63 | ELSEIF(APPLE)
|
|---|
| 64 | # it's with gui, so MACOSX_BUNDLE is needed
|
|---|
| 65 | ADD_EXECUTABLE(siweatherstation ${neededStuff})
|
|---|
| 66 | ELSEIF(WIN32)
|
|---|
| 67 | # it's with gui, so WIN32 is needed
|
|---|
| 68 | ADD_EXECUTABLE(siweatherstation ${neededStuff})
|
|---|
| 69 | SET_TARGET_PROPERTIES(siweatherstation PROPERTIES DEBUG_POSTFIX d)
|
|---|
| 70 | ENDIF()
|
|---|
| 71 |
|
|---|
| 72 | TARGET_LINK_LIBRARIES(siweatherstation ${LINK_LIBRARIES})
|
|---|
| 73 |
|
|---|
| 74 | qt5_use_modules(siweatherstation Core)
|
|---|
| 75 |
|
|---|
| 76 | # The COMPONENT option only defines the internal belonging of the INSTALL'ed thing
|
|---|
| 77 | INSTALL(
|
|---|
| 78 | TARGETS siweatherstation
|
|---|
| 79 | RUNTIME DESTINATION ${bin_DIR}
|
|---|
| 80 | COMPONENT application
|
|---|
| 81 | )
|
|---|