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

19 lines
692 B
CMake

cmake_minimum_required(VERSION 3.15)
project(lemonbbs C)
set(CMAKE_C_STANDARD 11)
find_package(OpenSSL REQUIRED)
aux_source_directory(${CMAKE_SOURCE_DIR}/src LEMONBBS_SOURCE)
aux_source_directory(${CMAKE_SOURCE_DIR}/extsrc LEMONBBS_EXTSOURCE)
add_executable(lemonbbs ${LEMONBBS_SOURCE} ${LEMONBBS_EXTSOURCE})
target_compile_definitions(lemonbbs PUBLIC _WIN32_WINNT=1536)
include_directories(${CMAKE_SOURCE_DIR}/extsrc ${OPENSSL_INCLUDE_DIR})
target_link_libraries(lemonbbs pthread ${OPENSSL_LIBRARIES})
if (WIN32)
# on Windows it's advisable to create a self-contained exe instead
target_link_libraries(lemonbbs ws2_32 -static)
else()
target_link_libraries(lemonbbs dl)
endif()