diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-11-27 02:55:59 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-11-27 02:55:59 -0800 |
commit | 49f808a003ee2706ee8e532ba9b640e60a080759 (patch) | |
tree | 4f80c10e1071ddd521b0cec8092db99fddf89b05 /tests | |
parent | 7f083d0baf42759994faba9133309e9e529a4b06 (diff) |
Link the tests with the shared pcap on Windows.
WinPcap never shipped a static pcap library, and if you *do* ship a
static pcap library, I'm not sure how you would distinguish it from the
import library for the dynamic pcap library.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bb0c4639..63781221 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,8 +10,13 @@ macro(add_test_executable _executable) ${_executable}.c ${PROJECT_SOURCE_LIST_WIN32_C}) set_target_properties(${_executable} PROPERTIES COMPILE_OPTIONS "${C_ADDITIONAL_FLAGS}") - target_link_libraries(${_executable} - ${ARGN} ${LIBRARY_NAME}_static ${PCAP_LINK_LIBRARIES}) + if(WIN32) + target_link_libraries(${_executable} + ${ARGN} ${LIBRARY_NAME} ${PCAP_LINK_LIBRARIES}) + else(WIN32) + target_link_libraries(${_executable} + ${ARGN} ${LIBRARY_NAME}_static ${PCAP_LINK_LIBRARIES}) + endif(WIN32) add_dependencies(tests ${_executable}) endmacro() |