###################### # # Meganizer - Media Organzier is a media management software # 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 SET(QT_USE_QTSQL FALSE) SET(QT_USE_QTNETWORK FALSE) SET(QT_USE_QTXML FALSE) IF(L10N_DE) SET(validator_TS ${validator_TS} lang/eanvalidatorplugin_de.ts) ENDIF(L10N_DE) IF(L10N_EN) SET(validator_TS ${validator_TS} lang/eanvalidatorplugin_en.ts) ENDIF(L10N_EN) IF(L10N_FR) SET(validator_TS ${validator_TS} lang/eanvalidatorplugin_fr.ts) ENDIF(L10N_FR) SET(validator_CPP eanvalidator.cpp ) # include with QT_USE selected library parts INCLUDE(${QT_USE_FILE}) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${libmeganizer_SOURCE_DIR} ${libmeganizer_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) LINK_DIRECTORIES(${libmeganizer_SOURCE_DIR}) # needed for QT-Plugins ADD_DEFINITIONS(-DQT_PLUGIN) IF(!${BUILD_DEBUG}) ADD_DEFINITIONS(-DQT_NO_DEBUG) ENDIF() ADD_DEFINITIONS(-DQT_SHARED) QT4_AUTOMOC(${validator_CPP}) QT4_ADD_TRANSLATION(validator_TRANS ${validator_TS}) ADD_LIBRARY(eanvalidator SHARED ${validator_CPP} ${validator_TRANS} ) TARGET_LINK_LIBRARIES(eanvalidator ${QT_LIBRARIES} libmeganizer ) # IF(MINGW) # SET_TARGET_PROPERTIES(eanvalidator # PROPERTIES LINK_FLAGS "-Wl,--enable-auto-import,--enable-runtime-pseudo-reloc" # ENABLE_EXPORTS ON) # ENDIF(MINGW) IF(WIN32) INSTALL( TARGETS eanvalidator RUNTIME DESTINATION ${MINPLUGINDIR} COMPONENT minvalidatorean ) ELSE(WIN32) INSTALL( TARGETS eanvalidator DESTINATION ${MINPLUGINDIR} ) ENDIF(WIN32) INSTALL( FILES ${validator_TRANS} DESTINATION ${qm_DIR} COMPONENT minvalidatorean ) IF(BUILD_TESTING) SET(QT_USE_QTTEST TRUE) SET(QT_DONT_USE_QTGUI TRUE) INCLUDE(${QT_USE_FILE}) INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${QT_INCLUDES}) SET(tests_CPP eanvalidatortests.cpp) QT4_AUTOMOC(${tests_CPP}) SET(tests_CPP ${tests_CPP} ${validator_CPP}) ADD_EXECUTABLE(eanvalidatortests ${tests_CPP}) TARGET_LINK_LIBRARIES(eanvalidatortests ${QT_LIBRARIES} libmeganizer ) ADD_TEST(EAN-Validator ${EXECUTABLE_OUTPUT_PATH}/eanvalidatortests) ENDIF(BUILD_TESTING)