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

@@ -99,6 +99,9 @@ endif()
wx_add_test(test_base ${TEST_SRC})
target_compile_definitions(test_base PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
if(wxUSE_SOCKETS)
wx_exe_link_libraries(test_base net)
endif()
if(wxUSE_XML)
wx_exe_link_libraries(test_base xml)
endif()