sockscape/server/CMakeLists.txt

25 lines
582 B
Text
Raw Normal View History

2018-02-14 01:16:58 +00:00
cmake_minimum_required(VERSION 2.6)
project(server)
2018-02-15 23:09:09 +00:00
file(GLOB_RECURSE server_src
"src/*.hpp"
"src/*.cpp"
2018-03-20 22:42:26 +00:00
)
2018-02-15 23:09:09 +00:00
2018-03-07 23:07:28 +00:00
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -static")
endif()
2018-02-15 23:09:09 +00:00
add_executable(server ${server_src})
2018-02-14 01:16:58 +00:00
2018-03-07 23:07:28 +00:00
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(server pthread nsl resolv)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(server wsock32 ws2_32)
else()
target_link_libraries(server pthread socket nsl resolv)
endif()
2018-03-15 04:01:24 +00:00
install(TARGETS server RUNTIME DESTINATION bin)
2018-03-21 04:29:24 +00:00