CMake: Only link executables to enabled libraries

This commit is contained in:
Maarten Bent
2018-01-20 00:55:43 +01:00
parent 76617ddb1e
commit fb8403a064
5 changed files with 34 additions and 3 deletions

View File

@@ -13,7 +13,10 @@ if(wxUSE_XRC)
if(wxBUILD_SHARED)
target_compile_definitions(wxrc PRIVATE WXUSINGDLL)
endif()
wx_exe_link_libraries(wxrc xml base)
if(wxUSE_XML)
wx_exe_link_libraries(wxrc xml)
endif()
wx_exe_link_libraries(wxrc base)
# TODO: install
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
endif()