###################### # # Copyright (C) 2010 - 2012 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. # ###################### IF(BINDINGS_QT4) SET(QT_USE_QTGUI TRUE) ENDIF(BINDINGS_QT4) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${libengsas_SOURCE_DIR} ${libengsas_BINARY_DIR} ) IF(BINDINGS_QT4) INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${QT_INCLUDES}) INCLUDE(${QT_USE_FILE}) ENDIF(BINDINGS_QT4) SET(LINK_LIBRARIES ${QT_LIBRARIES} libengsas ) IF(BINDINGS_KDE) # include (KDE4Defaults) INCLUDE_DIRECTORIES(${KDE4_INCLUDES}) SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${KDE_KDEUI_LIBS}) ENDIF(BINDINGS_KDE) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/epartexeconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/epartexeconfig.h ) SET(src_CPP main.cpp ) IF(BINDINGS_QT4) QT4_AUTOMOC(${src_CPP}) ENDIF(BINDINGS_QT4) # needed to compile the icon into the exe file # the MINGW part is a workaround, since mingw can not handle the rc file # (msvc can handle it) IF(WIN32) IF( MINGW ) # resource compilation for MinGW ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/epartexe.rc -o ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o ) SET(src_CPP ${src_CPP} ${CMAKE_CURRENT_BINARY_DIR}/epartexeico.o) ELSE( MINGW ) SET(src_CPP ${src_CPP} epartexe.rc) ENDIF( MINGW ) ENDIF(WIN32) SET(neededStuff ${src_CPP} ) IF(COMPATIBLE_WITH_NON_KDE) SET(OUTPUT_NAME "epartexe-kde") ELSE(COMPATIBLE_WITH_NON_KDE) SET(OUTPUT_NAME "epartexe") ENDIF(COMPATIBLE_WITH_NON_KDE) IF(UNIX) ADD_EXECUTABLE(epartexe ${neededStuff}) SET_TARGET_PROPERTIES(epartexe PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) ELSEIF(APPLE) # it's with gui, so MACOSX_BUNDLE is needed ADD_EXECUTABLE(epartexe MACOSX_BUNDLE ${neededStuff}) ELSEIF(WIN32) # it's with gui, so WIN32 is needed ADD_EXECUTABLE(epartexe WIN32 ${neededStuff}) SET_TARGET_PROPERTIES(epartexe PROPERTIES DEBUG_POSTFIX d) ENDIF() TARGET_LINK_LIBRARIES(epartexe ${LINK_LIBRARIES}) IF(BINDINGS_QT5) qt5_use_modules(epartexe Core Widgets) SET(CMAKE_AUTOMOC ON) ENDIF(BINDINGS_QT5) # The COMPONENT option only defines the internal belonging of the INSTALL'ed thing INSTALL( TARGETS epartexe RUNTIME DESTINATION ${bin_DIR} COMPONENT applicationepartexe )