diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/X11/CMakeLists.txt | 11 |
2 files changed, 16 insertions, 4 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ca87201..9e59660 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -407,7 +407,13 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackComponents") ENDIF(CTEST_RUN_CPackComponents) - ADD_TEST(X11 ${CMAKE_CTEST_COMMAND} + IF(CTEST_TEST_CPACK) + SET(X11_build_target_arg --build-target package) + ELSE(CTEST_TEST_CPACK) + SET(X11_build_target_arg) + ENDIF(CTEST_TEST_CPACK) + + ADD_TEST(X11 ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/X11" "${CMake_BINARY_DIR}/Tests/X11" @@ -415,6 +421,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel --build-project UseX11 --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-two-config + ${X11_build_target_arg} --test-command UseX11) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/X11") diff --git a/Tests/X11/CMakeLists.txt b/Tests/X11/CMakeLists.txt index 52f4a6f..cc24464 100644 --- a/Tests/X11/CMakeLists.txt +++ b/Tests/X11/CMakeLists.txt @@ -6,6 +6,7 @@ INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake) MESSAGE("X11_FOUND: ${X11_FOUND}") ADD_EXECUTABLE (UseX11 X11.c) +install(TARGETS UseX11 DESTINATION bin) # so for universal binaries this test will fail if # @@ -26,10 +27,14 @@ IF(X11_FOUND) IF(APPLE) ADD_EXECUTABLE(HelloWorldX11 HelloWorldX11.cxx) TARGET_LINK_LIBRARIES(HelloWorldX11 ${X11_LIBRARIES}) - install( TARGETS HelloWorldX11 DESTINATION bin) - # build a CPack driven installer package + install(TARGETS HelloWorldX11 DESTINATION bin) + + set(CPACK_BINARY_OSXX11 "ON") + set(CPACK_BINARY_PACKAGEMAKER "OFF") set(CPACK_PACKAGE_NAME HelloWorldX11Package) set(CPACK_PACKAGE_EXECUTABLES HelloWorldX11 HelloWorldX11) - include(CPack) ENDIF(APPLE) ENDIF(X11_FOUND) + +# build a CPack driven installer package +include(CPack) |