###################### # # Copyright (C) 2014 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(L10N_DE) #SET(libengsas_graphs_TS ${libengsas_graphs_TS} lang/libengsas-graphs_de.ts) ENDIF(L10N_DE) IF(L10N_EN) #SET(libengsas_graphs_TS ${libengsas_graphs_TS} lang/libengsas-graphs_en.ts) ENDIF(L10N_EN) IF(L10N_FR) #SET(libengsas_graphs_TS ${libengsas_graphs_TS} lang/libengsas-graphs_fr.ts) ENDIF(L10N_FR) SET(libengsas_graphs_CPP egraphs.h egraph.cpp egraphnode.cpp egraphedge.cpp egraphdriver.h private/egraphdatabaseconnectiondict.cpp private/egraphdatabaseprivate.cpp egraphdatabase.cpp egraphquery.cpp egraphqueryresult.cpp ) # IF(WITH_QML) # SET(QT_USE_QTDECLARATIVE TRUE) # SET(libengsas_charts_CPP # ${libengsas_charts_CPP} # echartqmlextension.cpp # echartbaseqml.cpp # echartpieqml.cpp # ) # SET(QML_MODULE_NAME "engsas-charts") # IF(WIN32) # SET(QML_MODULE_NAME "libengsas-charts") # ENDIF(WIN32) # CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/qmldir.in ${CMAKE_CURRENT_BINARY_DIR}/qmldir) # ENDIF(WITH_QML) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/egraphs-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/egraphs-config.h) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/private ${CMAKE_CURRENT_SOURCE_DIR}/private ${libengsas_SOURCE_DIR} ${libengsas_BINARY_DIR} ${QGV_INCLUDE_DIRS} ) IF(BINDINGS_QT4) INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${QT_INCLUDES}) INCLUDE(${QT_USE_FILE}) ENDIF(BINDINGS_QT4) ADD_DEFINITIONS(-DE_BUILD_GRAPHS_LIB) IF(BINDINGS_QT4) QT4_ADD_TRANSLATION(libengsas_graphs_TRANS ${libengsas_graphs_TS}) ENDIF(BINDINGS_QT4) IF(BINDINGS_QT5) QT5_ADD_TRANSLATION(libengsas_graphs_TRANS ${libengsas_graphs_TS}) ENDIF(BINDINGS_QT5) ADD_LIBRARY(libengsas_graphs SHARED ${libengsas_graphs_CPP} ${libengsas_graphs_TRANS} ) TARGET_LINK_LIBRARIES(libengsas_graphs ${QT_LIBRARIES} libengsas ${QGV_LIBRARIES} ) IF(BINDINGS_QT5) qt5_use_modules(libengsas_graphs Core Widgets) SET(CMAKE_AUTOMOC ON) IF(WITH_QML) qt5_use_modules(libengsas_graphs Qml Quick) ENDIF(WITH_QML) ENDIF(BINDINGS_QT5) INSTALL( FILES ${libengsas_TRANS} DESTINATION ${qm_DIR} COMPONENT graphs ) SET_TARGET_PROPERTIES(libengsas_graphs PROPERTIES OUTPUT_NAME "engsas-graphs" VERSION ${TARGET_VERSION_MAJOR}.${TARGET_VERSION_MINOR}.${${PROJECT_NAME}_PATCH_LEVEL} SOVERSION ${TARGET_VERSION_MAJOR}) IF(WIN32) INSTALL(TARGETS libengsas_graphs RUNTIME DESTINATION ${LIB_INSTALL_DIR} COMPONENT graphs ) IF(MSVC) INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/engsas-graphs.lib DESTINATION ${LIB_INSTALL_DIR} COMPONENT graphs) ENDIF(MSVC) ELSE(WIN32) INSTALL(TARGETS libengsas_graphs LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT graphs ) ENDIF(WIN32) IF(BUILD_DEV) FILE(GLOB header "${CMAKE_CURRENT_SOURCE_DIR}/*.h") INSTALL( FILES ${header} DESTINATION ${include_DIR}/graphs 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/graphs") SET(lib_flag "\${libdir}") SET(include_flag "\${includedir}") SET(LIBNAME engsas-graphs) IF(BINDINGS_QT4) SET(REQUIRES "QtCore >= 4") ENDIF(BINDINGS_QT4) IF(BINDINGS_QT5) SET(REQUIRES "QtCore >= 5") ENDIF(BINDINGS_QT5) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/libengsas-graphs.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libengsas-graphs.pc ) # Install pkgconfig file INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/libengsas-graphs.pc DESTINATION ${pkgconfig_DIR} COMPONENT devfinding ) # IF(WITH_QML) # INSTALL( # FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir # DESTINATION "${qml_DIR}/charts" # COMPONENT devqml # ) # ENDIF(WITH_QML) ENDIF(BUILD_DEV)