diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-02 23:23:27 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-02 23:23:27 (GMT) |
commit | c06828a4a0e419b6d3ab5bd0f885ce507ee382b7 (patch) | |
tree | 29142d6446a0b57a7f5f77bd92838b08e839517f /Tests/SimpleInstallS2 | |
parent | 5e4e4b74ab5fc4db4c75dd0558b3b68fdbfd6c00 (diff) | |
download | CMake-c06828a4a0e419b6d3ab5bd0f885ce507ee382b7.zip CMake-c06828a4a0e419b6d3ab5bd0f885ce507ee382b7.tar.gz CMake-c06828a4a0e419b6d3ab5bd0f885ce507ee382b7.tar.bz2 |
ENH: Make test work on windows
Diffstat (limited to 'Tests/SimpleInstallS2')
-rw-r--r-- | Tests/SimpleInstallS2/CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index e8a9ba8..d87ec48 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -9,7 +9,7 @@ ADD_LIBRARY(test1 STATIC lib1.cxx) ADD_LIBRARY(test2 SHARED lib2.cxx) ADD_LIBRARY(test3 MODULE lib3.cxx) ADD_EXECUTABLE (SimpleInstall inst.cxx foo.c foo.h) -TARGET_LINK_LIBRARIES(SimpleInstall test1 test2) +TARGET_LINK_LIBRARIES(SimpleInstall test1 test2 test3) INSTALL_TARGETS(/bin SimpleInstall) INSTALL_TARGETS(/lib test1 test2 test3) @@ -17,6 +17,7 @@ INSTALL_TARGETS(/include lib1.h lib2.h lib3.h) SET(EXTRA_INSTALL_FLAGS) IF(CMAKE_GENERATOR MATCHES "^Visual Studio") + MESSAGE("CMake generator: ${CMAKE_GENERATOR}") FOREACH(build_type Debug Release RelWithDebInfo MinSizeRel) IF(MAKEPROGRAM MATCHES "/build ${build_type}") SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${build_type}) @@ -25,12 +26,19 @@ IF(CMAKE_GENERATOR MATCHES "^Visual Studio") SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${build_type}) ENDIF(MAKEPROGRAM MATCHES "- ${build_type}") ENDFOREACH(build_type) + IF(NOT EXTRA_INSTALL_FLAGS) + IF(BUILD_TYPE) + SET(EXTRA_INSTALL_FLAGS -DBUILD_TYPE=${BUILD_TYPE}) + ENDIF(BUILD_TYPE) + ENDIF(NOT EXTRA_INSTALL_FLAGS) ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio") +MESSAGE("Extra install: ${EXTRA_INSTALL_FLAGS}") + ADD_CUSTOM_COMMAND( TARGET SimpleInstall POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -Pcmake_install.cmake ${EXTRA_INSTALL_FLAGS} + ARGS ${EXTRA_INSTALL_FLAGS} -Pcmake_install.cmake COMMENT "Install Project" ) |