1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00
SqMod/module/Vendor/CivetWeb/CMakeLists.txt
2020-09-04 23:50:12 +03:00

27 lines
858 B
CMake

# Create the CivetWeb library
add_library(CivetWeb STATIC
include/civetweb.h
civetweb.c
)
# Configure include folders
target_include_directories(CivetWeb PRIVATE ${CMAKE_CURRENT_LIST_DIR})
target_include_directories(CivetWeb PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
# Configure macro options
target_compile_definitions(CivetWeb PRIVATE _WIN32_WINNT=0x0601)
# Enable LTO
if (LTO_ENABLED)
target_link_libraries(CivetWeb PRIVATE -flto)
endif()
# Allow dynamic loading of SSL
target_link_libraries(CivetWeb PUBLIC dl)
# Find the available thread library
find_package(Threads)
target_link_libraries(CivetWeb PUBLIC ${CMAKE_THREAD_LIBS_INIT})
# OS and compiler checks.
if(WIN32)
target_link_libraries(CivetWeb PUBLIC Ws2_32)
endif()
# Need the realtime library if we're using timers
if(UNIX AND NOT APPLE)
target_link_libraries(CivetWeb PUBLIC rt)
endif()