###################### # # 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(BINDINGS_QT4) SET(QT_USE_QTNETWORK TRUE) ENDIF(BINDINGS_QT4) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${libengsas_graphs_SOURCE_DIR} ${libengsas_graphs_BINARY_DIR} ${libengsas_SOURCE_DIR} ${libengsas_BINARY_DIR} ${QJSON_INCLUDE_DIR} ) IF(BINDINGS_QT4) # QT5 does not declare and does not need QT_INCLUDES SET(INCLUDE_DIRECTORIES ${INCLUDES_DIRECTORIES} ${QT_INCLUDES}) INCLUDE(${QT_USE_FILE}) ENDIF(BINDINGS_QT4) SET(LINK_LIBRARIES ${QT_LIBRARIES} ${QJSON_LIBRARIES} libengsas libengsas_graphs ) IF(L10N_DE) #SET(efilesystemplugin_TS ${efilesystemplugin_TS} lang/efilesystemplugin_de.ts) ENDIF(L10N_DE) IF(L10N_EN) #SET(efilesystemplugin_TS ${efilesystemplugin_TS} lang/efilesystemplugin_en.ts) ENDIF(L10N_EN) IF(L10N_FR) #SET(efilesystemplugin_TS ${efilesystemplugin_TS} lang/efilesystemplugin_fr.ts) ENDIF(L10N_FR) SET(egraphdriver_QRC ) SET(egraphdriver_UI ) SET(egraphdriver_CPP neo4jdriver.cpp neo4jquery.cpp neo4jqueryresult.cpp ) # needed for QT-Plugins ADD_DEFINITIONS(-DQT_PLUGIN) ADD_DEFINITIONS(-DQT_SHARED) IF(BINDINGS_QT4) QT4_WRAP_UI(egraphdriver_UI_H ${egraphdriver_UI}) QT4_ADD_TRANSLATION(egraphdriver_TRANS ${egraphdriver_TS}) QT4_ADD_RESOURCES(egraphdriver_RCCS ${egraphdriver_QRC}) ENDIF(BINDINGS_QT4) IF(BINDINGS_QT5) QT5_WRAP_UI(egraphdriver_UI_H ${egraphdriver_UI}) QT5_ADD_TRANSLATION(egraphdriver_TRANS ${egraphdriver_TS}) QT5_ADD_RESOURCES(egraphdriver_RCCS ${egraphdriver_QRC}) ENDIF(BINDINGS_QT5) ADD_LIBRARY(neo4jdriver SHARED ${egraphdriver_CPP} ${egraphdriver_UI_H} ${egraphdriver_TRANS} ${egraphdriver_RCCS} ) TARGET_LINK_LIBRARIES(neo4jdriver ${LINK_LIBRARIES} ) IF(BINDINGS_QT5) qt5_use_modules(neo4jdriver Core Network) ENDIF(BINDINGS_QT5) # IF(MINGW) # SET_TARGET_PROPERTIES(neo4jdriver # PROPERTIES LINK_FLAGS "-Wl,--enable-auto-import,--enable-runtime-pseudo-reloc" # ENABLE_EXPORTS ON) # ENDIF(MINGW) IF(WIN32) INSTALL( TARGETS neo4jdriver RUNTIME DESTINATION ${ENGSAS_GRAPH_DRIVER_PLUGIN_DIR} COMPONENT neo4jdriver ) FIND_FILE(pack_qjson libqjson.dll PATHS ${QJSON_DIR}/../../../bin NO_DEFAULT_PATH) INSTALL( FILES ${pack_qjson} DESTINATION ${bin_DIR} COMPONENT neo4jdriver ) ELSE(WIN32) INSTALL( TARGETS neo4jdriver DESTINATION ${ENGSAS_GRAPH_DRIVER_PLUGIN_DIR} COMPONENT neo4jdriver ) ENDIF(WIN32) INSTALL( FILES ${efilesystemplugin_TRANS} DESTINATION ${qm_DIR} COMPONENT neo4jdriver ) IF(BUILD_TESTING) ADD_SUBDIRECTORY(tests) ENDIF(BUILD_TESTING)