Files
maxDcb-C2Core/modules/Netstat/CMakeLists.txt
T
2025-09-02 16:18:35 +02:00

15 lines
771 B
CMake

include_directories(../)
add_library(Netstat SHARED Netstat.cpp)
set_property(TARGET Netstat PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded")
target_link_libraries(Netstat )
add_custom_command(TARGET Netstat POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:Netstat> "${CMAKE_SOURCE_DIR}/Release/Modules/$<TARGET_FILE_NAME:Netstat>")
if(C2CORE_BUILD_TESTS)
add_executable(testsNetstat tests/testsNetstat.cpp Netstat.cpp)
target_link_libraries(testsNetstat )
add_custom_command(TARGET testsNetstat POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:testsNetstat> "${CMAKE_SOURCE_DIR}/Tests/$<TARGET_FILE_NAME:testsNetstat>")
add_test(NAME testsNetstat COMMAND "${CMAKE_SOURCE_DIR}/Tests/$<TARGET_FILE_NAME:testsNetstat>")
endif()