###################### # # Meganizer - Media Organzier is a media management software # Copyright (C) 2010 - 2015 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 TRUE) SET(QT_USE_QTNETWORK FALSE) IF(L10N_DE) SET(magazines_TS ${magazines_TS} lang/magazines_de.ts) ENDIF(L10N_DE) IF(L10N_EN) SET(magazines_TS ${magazines_TS} lang/magazines_en.ts) ENDIF(L10N_EN) IF(L10N_FR) SET(magazines_TS ${magazines_TS} lang/magazines_fr.ts) ENDIF(L10N_FR) SET(magazines_QRC ) SET(magazines_UI magazinesearchwidget.ui ) SET(magazines_CPP magazines.cpp magazinesdb.cpp magazine.cpp magazinesmodel.cpp magazineedit.cpp magazineissuewidget.cpp magazinesearchwidget.cpp article.cpp articlesmodel.cpp articleedit.cpp articlepagewidgets.cpp ) # include with QT_USE selected library parts INCLUDE(${QT_USE_FILE}) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${LIBENGSAS_INCLUDE_DIR} ${libmeganizer_SOURCE_DIR} ${libmeganizer_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) LINK_DIRECTORIES(${libmeganizer_SOURCE_DIR}) SET(depends_XML ${CMAKE_BINARY_DIR}/depends/mediaplugin_magazines.xml) CONFIGURE_FILE(dependencies.xml.in ${depends_XML}) # needed for QT-Plugins ADD_DEFINITIONS(-DQT_PLUGIN) IF(!${BUILD_DEBUG}) ADD_DEFINITIONS(-DQT_NO_DEBUG) ENDIF() ADD_DEFINITIONS(-DQT_SHARED) QT4_AUTOMOC(${magazines_CPP}) QT4_WRAP_UI(magazines_UI_H ${magazines_UI}) QT4_ADD_TRANSLATION(magazines_TRANS ${magazines_TS}) QT4_ADD_RESOURCES(magazines_RCCS ${magazines_QRC}) ADD_LIBRARY(magazines SHARED ${magazines_CPP} ${magazines_UI_H} ${magazines_TRANS} ${magazines_RCCS} ) TARGET_LINK_LIBRARIES(magazines ${QT_LIBRARIES} ${LIBENGSAS_LIBRARIES} libmeganizer ) # IF(MINGW) # SET_TARGET_PROPERTIES(magazines # PROPERTIES LINK_FLAGS "-Wl,--enable-auto-import,--enable-runtime-pseudo-reloc" # ENABLE_EXPORTS ON) # ENDIF(MINGW) IF(WIN32) INSTALL( TARGETS magazines RUNTIME DESTINATION ${PLUGINDIR} COMPONENT magazines ) ELSE(WIN32) INSTALL( TARGETS magazines DESTINATION ${PLUGINDIR} COMPONENT magazines ) ENDIF(WIN32) INSTALL( FILES ${magazines_TRANS} DESTINATION ${qm_DIR} COMPONENT magazines ) INSTALL( FILES ${depends_XML} DESTINATION ${depends_DIR} COMPONENT magazines ) IF(BUILD_TESTING) ADD_SUBDIRECTORY(tests) ENDIF(BUILD_TESTING)