###################### # # Copyright (C) 2010 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ###################### # enable all QT-Stuff we need # see http://cmake.org/cmake/help/cmake2.6docs.html#module:FindQt4 for a complete list # since qt can be installed anywhere on windows, # we install them into our own directory # and the user must copy it itself into the # right directory on windows SET(designer_DIR ${QT_PLUGINS_DIR}/designer) IF(WIN32 AND BUILD_PACKAGE) SET(designer_DIR ${bin_DIR}/designer) ENDIF(WIN32 AND BUILD_PACKAGE) SET(QT_USE_QTDESIGNER TRUE) SET(QT_USE_QTGUI TRUE) SET(designer_CPP designerwidgetcollection.cpp edialogdesignerplugin.cpp ewidgetdesignerplugin.cpp esettingswidgetdesignerplugin.cpp epushbuttondesignerplugin.cpp elistaddbuttondesignerplugin.cpp elistremovebuttondesignerplugin.cpp esearchbuttondesignerplugin.cpp etableviewdesignerplugin.cpp escaledimagedesignerplugin.cpp eupdatenoticesettingsdesignerplugin.cpp edbsettingswidgetdesignerplugin.cpp ) # include with QT_USE selected library parts INCLUDE(${QT_USE_FILE}) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${libengsas_SOURCE_DIR} ${libengsas_BINARY_DIR} ) QT4_WRAP_UI(designer_UI_H ${designer_UI}) # moc classes QT4_AUTOMOC(${designer_CPP}) ADD_LIBRARY(engsasdesignerplugin SHARED ${designer_CPP} ${designer_UI_H} ) TARGET_LINK_LIBRARIES(engsasdesignerplugin ${QT_LIBRARIES} libengsas ) IF(MINGW) SET_TARGET_PROPERTIES(engsasdesignerplugin PROPERTIES LINK_FLAGS "-Wl,--enable-auto-import,--enable-runtime-pseudo-reloc" ENABLE_EXPORTS ON) ENDIF(MINGW) IF(WIN32) INSTALL( TARGETS engsasdesignerplugin RUNTIME DESTINATION ${designer_DIR} COMPONENT devdesigner ) ELSE(WIN32) INSTALL( TARGETS engsasdesignerplugin DESTINATION ${designer_DIR} COMPONENT devdesigner ) ENDIF(WIN32) IF(BUILD_TESTING) ADD_SUBDIRECTORY(tests) ENDIF(BUILD_TESTING)