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

@@ -701,7 +701,7 @@ function(wx_add_test name)
endif()
add_executable(${name} ${test_src})
target_include_directories(${name} PRIVATE "${wxSOURCE_DIR}/tests" "${wxSOURCE_DIR}/3rdparty/catch/include")
wx_exe_link_libraries(${name} base net)
wx_exe_link_libraries(${name} base)
if(wxBUILD_SHARED)
target_compile_definitions(${name} PRIVATE WXUSINGDLL)
endif()