###################### # # Copyright (C) 2010 - 2012 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. # ###################### # Prepare testing environment for testing with qjson IF(WIN32) ADD_CUSTOM_COMMAND( OUTPUT "${EXECUTABLE_OUTPUT_PATH}/libqjson.dll" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${pack_qjson}" "${EXECUTABLE_OUTPUT_PATH}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) ADD_CUSTOM_TARGET( prepare_testing_neo4j ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/libqjson.dll" COMMENT "Copying shared libraries into ${EXECUTABLE_OUTPUT_PATH}" ) #ADD_DEPENDENCIES(test prepare_testing) ENDIF(WIN32) IF(BINDINGS_QT4) SET(QT_USE_QTTEST TRUE) ENDIF(BINDINGS_QT4) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${libengsas_SOURCE_DIR} ${libengsas_BINARY_DIR} ${libengsas_graphs_SOURCE_DIR} ${libengsas_graphs_BINARY_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) # needed for QT-Plugins IF(!${BUILD_DEBUG}) ADD_DEFINITIONS(-DQT_NO_DEBUG) ENDIF() IF(WIN32) SET(SHAREDIR ".") ELSE(WIN32) SET(SHAREDIR ${share_DIR}) ENDIF(WIN32) SET(LIBOUTDIR ${LIBRARY_OUTPUT_PATH}) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/neo4jtestconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/neo4jtestconfig.h) ################################### # # # Neo4JDriver Test # # # ################################### SET(test_CPP testneo4j.cpp) ADD_EXECUTABLE(testneo4j ${test_CPP}) TARGET_LINK_LIBRARIES(testneo4j ${QT_LIBRARIES} libengsas libengsas_graphs ) IF(BINDINGS_QT5) qt5_use_modules(testneo4j Core Test) ENDIF(BINDINGS_QT5) ADD_TEST(TestNeo4J ${EXECUTABLE_OUTPUT_PATH}/testneo4j)