diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6643579bd..51ca3fb90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ find_package(LibXslt 1.1.19) option(DISABLE_DOCSTRINGS "Disable documentation extraction." FALSE) option(BUILD_TESTS "Build tests." TRUE) +option(INSTALL_TESTS "Install tests" FALSE) option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE) if (NOT DISABLE_DOCSTRINGS) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 959d4f48b..575865e19 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,6 +5,9 @@ macro(declare_test testname) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${apiextractor_SOURCE_DIR}) target_link_libraries(${testname} ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} apiextractor) add_test(${testname} ${testname}) + if (INSTALL_TESTS) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${testname} DESTINATION share/apiextractor${apiextractor_SUFFIX}/tests) + endif() endmacro(declare_test testname) declare_test(testabstractmetaclass) |