This repository has been archived on 2021-07-03. You can view files and clone it, but cannot push or open issues or pull requests.
glovechat/CMakeLists.txt

26 lines
679 B
CMake
Raw Normal View History

2018-12-20 22:30:51 +00:00
cmake_minimum_required(VERSION 3.7)
set(CMAKE_C_STANDARD 99)
project(glovechat C)
file(GLOB_RECURSE glv_src
"src/*.h"
"src/*.c"
2018-12-20 22:30:51 +00:00
)
find_package(OpenSSL)
add_executable(server ${glv_src})
2018-12-20 22:30:51 +00:00
target_include_directories(server
2019-01-15 22:24:52 +00:00
PRIVATE ${OPENSSL_INCLUDE_DIR}
PRIVATE ${PROJECT_SOURCE_DIR}/src)
2018-12-20 22:30:51 +00:00
target_link_libraries(server ${OPENSSL_LIBRARIES})
install(TARGETS server RUNTIME DESTINATION bin/server)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(server wsock32 ws2_32)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
2019-01-03 21:37:41 +00:00
target_link_libraries(server pthread nsl resolv)
2018-12-20 22:30:51 +00:00
else()
2019-01-03 21:37:41 +00:00
target_link_libraries(server pthread socket nsl resolv)
2018-12-20 22:30:51 +00:00
endif()