Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed May 1, 2024
1 parent 8384e28 commit bd95809
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ set(sources
)

add_library(simple_socket ${sources})
target_compile_features(simple_socket PUBLIC "cxx_std_17")

if (WIN32)
target_link_libraries(simple_socket ws2_32)
endif ()


target_include_directories(simple_socket
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)

if (WIN32)
target_link_libraries(simple_socket ws2_32)
endif ()
5 changes: 5 additions & 0 deletions tests/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ target_link_libraries(run_server PRIVATE simple_socket)

add_executable(run_client run_client.cpp)
target_link_libraries(run_client PRIVATE simple_socket)

if (UNIX)
target_link_libraries(run_server PRIVATE pthread)
target_link_libraries(run_client PRIVATE pthread)
endif ()

0 comments on commit bd95809

Please sign in to comment.