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 5 years ago
parent f2001c3940
commit 0816b7a74a
No known key found for this signature in database
GPG Key ID: C08038BDF280D33E

@ -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