diff options
author | Brad King <brad.king@kitware.com> | 2020-01-24 16:03:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-24 16:29:45 (GMT) |
commit | 08699cec6807bd3104fd0aae11377662bb1db957 (patch) | |
tree | 2e83615102ae3924a1cada57a0118f03a50fed8a /Tests/CustomCommand/CMakeLists.txt | |
parent | ab2fc918216011a03f0fe7696e7bba67fc2627b3 (diff) | |
download | CMake-08699cec6807bd3104fd0aae11377662bb1db957.zip CMake-08699cec6807bd3104fd0aae11377662bb1db957.tar.gz CMake-08699cec6807bd3104fd0aae11377662bb1db957.tar.bz2 |
add_custom_command: Fix dependency on macOS framework target
When the `DEPENDS` option names a logical target name, convert to the
"real" path of that target rather than any of the symlink-provided
alternative file names. This makes the dependencies consistent with the
outputs named by link rules producing the target artifacts.
Fixes: #20264
Diffstat (limited to 'Tests/CustomCommand/CMakeLists.txt')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 196fea3..53d56bf 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -566,3 +566,11 @@ add_custom_command( ) add_custom_target(depends_on_in_rel_source_path ALL DEPENDS "depends_on_in_rel_source_path.txt") + +add_library(mac_fw SHARED mac_fw.c) +set_target_properties(mac_fw PROPERTIES + FRAMEWORK 1 + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib + ) +add_custom_command(OUTPUT mac_fw.txt COMMAND ${CMAKE_COMMAND} -E touch mac_fw.txt DEPENDS mac_fw) +add_custom_target(drive_mac_fw ALL DEPENDS mac_fw.txt) |