###################### # # Copyright (C) 2010 - 2011 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 . # ###################### SET(QT_USE_QTTEST TRUE) SET(QT_USE_QTDESIGNER TRUE) SET(libengsas_testing_CPP eclosemodalwidgetthread.cpp private/ecloser.cpp modeltest.cpp testpluginforemodulelistwidgetitem.cpp testdesignerplugins.cpp testeparts.cpp ) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${libengsas_SOURCE_DIR} ${libengsas_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/private ${CMAKE_CURRENT_SOURCE_DIR}/private ) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(-DE_BUILD_TESTING_LIB) QT4_AUTOMOC(${libengsas_testing_CPP}) ADD_LIBRARY(libengsas_testing SHARED ${libengsas_testing_CPP} ) TARGET_LINK_LIBRARIES(libengsas_testing ${QT_LIBRARIES} libengsas ) IF(WIN32) SET_TARGET_PROPERTIES(libengsas_testing PROPERTIES OUTPUT_NAME "engsas-testing" VERSION ${${PROJECT_NAME}_VERSION}) IF(BUILD_DEV) INSTALL(TARGETS libengsas_testing RUNTIME DESTINATION ${LIB_INSTALL_DIR} COMPONENT library ) ENDIF(BUILD_DEV) ELSE(WIN32) SET_TARGET_PROPERTIES(libengsas_testing PROPERTIES OUTPUT_NAME "engsas-testing" SOVERSION ${TARGET_VERSION_MAJOR}.${TARGET_VERSION_MINOR}.${${PROJECT_NAME}_PATCH_LEVEL}) IF(BUILD_DEV) INSTALL(TARGETS libengsas_testing LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT library ) ENDIF(BUILD_DEV) ENDIF(WIN32) IF(BUILD_DEV) IF(WIN32) # Qt itself FIND_FILE(pack_qttest QtTest4.dll PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH) INSTALL( FILES ${pack_qttest} DESTINATION ${bin_DIR} COMPONENT qtlibs ) ENDIF(WIN32) FILE(GLOB header "${CMAKE_CURRENT_SOURCE_DIR}/*.h") INSTALL( FILES ${header} DESTINATION ${include_DIR}/testing COMPONENT headerfiles ) # CMake overrides ${var} during configuration, therefore we insert it with cmake SET(prefix ${CMAKE_INSTALL_PREFIX}) SET(exec_prefix "\${prefix}") SET(libdir "\${exec_prefix}/lib") SET(includedir "\${prefix}/include/engsas") SET(lib_flag "\${libdir}") SET(include_flag "\${includedir}") SET(LIBNAME engsas-testing) SET(REQUIRES "QtCore >= 4, QtTest >= 4") CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/libengsas-testing.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libengsas-testing.pc ) # Install pkgconfig file INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/libengsas-testing.pc DESTINATION ${pkgconfig_DIR} COMPONENT devfinding ) ENDIF(BUILD_DEV)