From 7611d0a4d22dd60a9236623c810e25f7e12ad377 Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Wed, 8 Dec 2010 15:45:46 -0300 Subject: Add option to install the tests binaries. Reviewer: Hugo Lima Reviewer: Marcelo Lira --- CMakeLists.txt | 1 + tests/CMakeLists.txt | 3 +++ 2 files changed, 4 insertions(+) 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) -- cgit v1.2.3