-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
261 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
##################################################### | ||
# Don't forget to include output directory, otherwise | ||
# the UI file won't be wrapped! | ||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
${CMAKE_SOURCE_DIR}/src/core | ||
${CMAKE_SOURCE_DIR}/src/core/composer | ||
${CMAKE_SOURCE_DIR}/src/core/raster | ||
${CMAKE_SOURCE_DIR}/src/core/symbology-ng | ||
${CMAKE_BINARY_DIR}/src/ui | ||
${CMAKE_SOURCE_DIR}/src/gui | ||
${CMAKE_SOURCE_DIR}/src/python | ||
${CMAKE_SOURCE_DIR}/src/app | ||
${CMAKE_SOURCE_DIR}/src/app/pluginmanager | ||
${QT_INCLUDE_DIR} | ||
${GDAL_INCLUDE_DIR} | ||
${PROJ_INCLUDE_DIR} | ||
${GEOS_INCLUDE_DIR} | ||
) | ||
|
||
############################################################# | ||
# Compiler defines | ||
|
||
# This define is used for tests that need to locate the test | ||
# data under tests/testdata in the qgis source tree. | ||
# the TEST_DATA_DIR variable is set in the top level CMakeLists.txt | ||
ADD_DEFINITIONS(-DTEST_DATA_DIR="\\"${TEST_DATA_DIR}\\"") | ||
|
||
ADD_DEFINITIONS(-DINSTALL_PREFIX="\\"${CMAKE_INSTALL_PREFIX}\\"") | ||
############################################################# | ||
# libraries | ||
|
||
# because of htonl | ||
IF (WIN32) | ||
SET(PLATFORM_LIBRARIES wsock32) | ||
ENDIF (WIN32) | ||
|
||
# Since the tests are not actually installed, but rather | ||
# run directly from the build/src/tests dir we need to | ||
# ensure the qgis libs can be found. | ||
IF (APPLE) | ||
# For Mac OS X, the executable must be at the root of the bundle's executable folder | ||
# SET (CMAKE_INSTALL_NAME_DIR @executable_path/../../../src/core) | ||
ENDIF (APPLE) | ||
|
||
#note for tests we should not include the moc of our | ||
#qtests in the executable file list as the moc is | ||
#directly included in the sources | ||
#and should not be compiled twice. Trying to include | ||
#them in will cause an error at build time | ||
|
||
#No relinking and full RPATH for the install tree | ||
#See: http://www.cmake.org/Wiki/CMake_RPATH_handling#No_relinking_and_full_RPATH_for_the_install_tree | ||
|
||
MACRO (ADD_QGIS_TEST testname testsrc) | ||
SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS}) | ||
SET(qgis_${testname}_MOC_CPPS ${testsrc}) | ||
QT4_WRAP_CPP(qgis_${testname}_MOC_SRCS ${qgis_${testname}_MOC_CPPS}) | ||
ADD_CUSTOM_TARGET(qgis_${testname}moc ALL DEPENDS ${qgis_${testname}_MOC_SRCS}) | ||
ADD_EXECUTABLE(qgis_${testname} ${qgis_${testname}_SRCS}) | ||
ADD_DEPENDENCIES(qgis_${testname} qgis_${testname}moc) | ||
TARGET_LINK_LIBRARIES(qgis_${testname} | ||
${QT_QTXML_LIBRARY} | ||
${QT_QTCORE_LIBRARY} | ||
${QT_QTSQL_LIBRARY} | ||
${QT_QTSVG_LIBRARY} | ||
${QT_QTTEST_LIBRARY} | ||
${PROJ_LIBRARY} | ||
${GEOS_LIBRARY} | ||
${GDAL_LIBRARY} | ||
${QWT_LIBRARY} | ||
${QWTPOLAR_LIBRARY} | ||
qgis_core | ||
qgis_gui | ||
qgis_analysis | ||
qgis_app) | ||
ADD_TEST(qgis_${testname} ${CMAKE_CURRENT_BINARY_DIR}/../../../output/bin/qgis_${testname}) | ||
#SET_TARGET_PROPERTIES(qgis_${testname} PROPERTIES | ||
# INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${QGIS_LIB_DIR} | ||
# INSTALL_RPATH_USE_LINK_PATH true ) | ||
ENDMACRO (ADD_QGIS_TEST) | ||
|
||
############################################################# | ||
# Tests: | ||
|
||
ADD_QGIS_TEST(qgisappclippboard testqgisappclipboard.cpp) |
Oops, something went wrong.