CMake: fix linking the DLL sample in monolithic build

This commit is contained in:
Maarten Bent
2020-05-17 19:41:57 +02:00
parent 0f806ad96d
commit ba3fd12efb
2 changed files with 7 additions and 3 deletions

View File

@@ -791,7 +791,9 @@ endfunction()
# Link libraries to a sample
function(wx_link_sample_libraries name)
target_link_libraries(${name} ${ARGN})
if(TARGET ${name})
target_link_libraries(${name} PUBLIC ${ARGN})
endif()
endfunction()
# Add a option and mark is as advanced if it starts with wxUSE_