diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-11-04 17:01:44 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-11-05 00:02:16 (GMT) |
commit | deeab72aae14de3bfce4189ea5e9ee42e7ad94dc (patch) | |
tree | 810e204154f19bacd006862c6ef1c4867cbcf186 /Tests/RunCMake/INSTALL_NAME_DIR/INSTALL_NAME_DIR.cmake | |
parent | 3c85f11fedf55c5072cd00deb129a0782130d78c (diff) | |
download | CMake-deeab72aae14de3bfce4189ea5e9ee42e7ad94dc.zip CMake-deeab72aae14de3bfce4189ea5e9ee42e7ad94dc.tar.gz CMake-deeab72aae14de3bfce4189ea5e9ee42e7ad94dc.tar.bz2 |
Tests: Add tests for INSTALL_NAME_DIR
Diffstat (limited to 'Tests/RunCMake/INSTALL_NAME_DIR/INSTALL_NAME_DIR.cmake')
-rw-r--r-- | Tests/RunCMake/INSTALL_NAME_DIR/INSTALL_NAME_DIR.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/INSTALL_NAME_DIR/INSTALL_NAME_DIR.cmake b/Tests/RunCMake/INSTALL_NAME_DIR/INSTALL_NAME_DIR.cmake new file mode 100644 index 0000000..eaa0b45 --- /dev/null +++ b/Tests/RunCMake/INSTALL_NAME_DIR/INSTALL_NAME_DIR.cmake @@ -0,0 +1,15 @@ +function(add_install_name_dir_libraries install_name_dir) + add_library(build_dir SHARED test.c) + add_library(install_dir SHARED test.c) + if(NOT install_name_dir STREQUAL "NONE") + set_target_properties(build_dir install_dir PROPERTIES + INSTALL_NAME_DIR "${install_name_dir}" + ) + endif() + set_target_properties(install_dir PROPERTIES + BUILD_WITH_INSTALL_NAME_DIR TRUE + ) + install(TARGETS build_dir install_dir EXPORT InstallNameDirTest DESTINATION lib) + install(EXPORT InstallNameDirTest DESTINATION lib/cmake/InstallNameDirTest FILE InstallNameDirTest-targets.cmake) + file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/targets.txt" CONTENT "$<TARGET_FILE:build_dir>\n$<TARGET_FILE:install_dir>\n" CONDITION $<CONFIG:Debug>) +endfunction() |