diff options
author | Brad King <brad.king@kitware.com> | 2014-02-21 21:47:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-02-21 22:05:26 (GMT) |
commit | 6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026 (patch) | |
tree | cc732c0ab42e7435005ac0c51f71b765f28b828e /Tests/ExportImport/Export | |
parent | f11f7b34a8e77c3bd68578f00b57e0884cb0d872 (diff) | |
download | CMake-6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026.zip CMake-6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026.tar.gz CMake-6e89c8a5f1d5aa9bffa95be2b1add8d2c4e55026.tar.bz2 |
install: Support generator expressions in FILES and PROGRAMS mode
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.
Extend the ExportImport test to cover installation cases involving
generator expressions.
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 16 | ||||
-rw-r--r-- | Tests/ExportImport/Export/testLib1file1.txt | 1 | ||||
-rw-r--r-- | Tests/ExportImport/Export/testLib1file2.txt | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 0e2828e..febdfe6 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -23,6 +23,22 @@ add_library(testLib1 STATIC testLib1.c) add_library(testLib2 STATIC testLib2.c) target_link_libraries(testLib2 testLib1) +# Test install(FILES) with generator expressions referencing testLib1. +add_custom_command(TARGET testLib1 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:testLib1> + $<TARGET_FILE:testLib1>.genex + ) +install(FILES $<TARGET_FILE:testLib1>.genex + DESTINATION lib + ) +set_property(TARGET testLib1 PROPERTY MY_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/testLib1file1.txt + ${CMAKE_CURRENT_SOURCE_DIR}/testLib1file2.txt + ) +install(FILES $<TARGET_PROPERTY:testLib1,MY_FILES> + DESTINATION doc + ) + # Test library with empty link interface. Link it to an implementation # dependency that itself links to dependencies publicly. add_library(testLib3ImpDep SHARED testLib3ImpDep.c) diff --git a/Tests/ExportImport/Export/testLib1file1.txt b/Tests/ExportImport/Export/testLib1file1.txt new file mode 100644 index 0000000..73601df --- /dev/null +++ b/Tests/ExportImport/Export/testLib1file1.txt @@ -0,0 +1 @@ +testLib1file1 diff --git a/Tests/ExportImport/Export/testLib1file2.txt b/Tests/ExportImport/Export/testLib1file2.txt new file mode 100644 index 0000000..4874ed1 --- /dev/null +++ b/Tests/ExportImport/Export/testLib1file2.txt @@ -0,0 +1 @@ +testLib1file2 |