Browse Source

Fix a problem with create_symlink()

It was erroring on duplicate target names. I did more research and found
out that I could just add a custom command to a target, post build. So
that's what this does.
master
Gavin Howard 4 years ago
parent
commit
0816b7a74a
Signed by: gavin GPG Key ID: C08038BDF280D33E
  1. 5
      functions.cmake

5
functions.cmake

@ -76,7 +76,10 @@ endfunction(create_data_target)
# Creates a symlink named "link" that points to "target".
function(create_symlink link target)
add_custom_target("${link}" ALL COMMAND "${CMAKE_COMMAND}" -E create_symlink "${target}" "${link}")
add_custom_command(
TARGET "${target}" POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E create_symlink "$<TARGET_FILE:${target}>" "${link}"
)
endfunction(create_symlink)
function(static_lib_path var lib_output_name)

Loading…
Cancel
Save