diff options
author | Alexander Neundorf <neundorf@kde.org> | 2023-02-22 23:55:53 +0100 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2023-02-26 16:37:37 +0100 |
commit | a2c9c4f202d1bfb104ddebf5db11f7b74824337f (patch) | |
tree | 8cda555a42b544b5053ec4547513aa93c54dbdba /Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS | |
parent | aa68de0a27ef19f95f542535a46cabb3765da4da (diff) | |
download | cmake-a2c9c4f202d1bfb104ddebf5db11f7b74824337f.tar.gz |
Add test for the new TARGET_RUNTIME_DLL_PATHS genex
For one of the shared libraries the RUNTIME_OUTPUT_PATH
is set to a subdir and the test is supposed to check that
those directories appear in TARGET_RUNTIME_DLL_PATHS genex
Diffstat (limited to 'Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS')
-rw-r--r-- | Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake index 806f0b60f2..c38fa39831 100644 --- a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake +++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/shared.cmake @@ -4,6 +4,10 @@ add_executable(exe main.c) add_library(lib1 SHARED lib1.c) add_library(lib2 SHARED lib2.c) add_library(lib3 SHARED lib3.c) +if(WIN32 OR CYGWIN) + set_property(TARGET lib3 PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/SomeSubDir/") +endif() + add_library(static STATIC static.c) add_library(imported SHARED IMPORTED) set_property(TARGET imported PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/imported.dll") @@ -26,9 +30,16 @@ if(WIN32 OR CYGWIN) "$<TARGET_FILE:lib3>" "$<TARGET_FILE:lib2>" ) + set(expected_dll_dirs + "$<PATH:GET_PARENT_PATH,$<TARGET_FILE:lib2>>" + "$<PATH:GET_PARENT_PATH,$<TARGET_FILE:imported>>" + "$<PATH:GET_PARENT_PATH,$<TARGET_FILE:lib3>>" + ) endif() -set(content "check_genex(\"${expected_dlls}\" \"$<TARGET_RUNTIME_DLLS:exe>\")\n") +set(content "check_genex(\"${expected_dlls}\" \"$<TARGET_RUNTIME_DLLS:exe>\") +check_genex(\"${expected_dll_dirs}\" \"$<TARGET_RUNTIME_DLL_DIRS:exe>\")\n") + set(condition) get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(multi_config) |