liblemonirc/CMakeLists.txt

22 lines
705 B
CMake

cmake_minimum_required(VERSION 3.19)
project(lemonirc C)
set(CMAKE_C_STANDARD 11)
option(LIRC_DEBUG "Log all IRC traffic to stdout" OFF)
option(LIRC_BUILD_EXAMPLE "Build the example app" ON)
add_library(lemonirc STATIC src/lemonirc.c)
include_directories(include)
if (LIRC_DEBUG)
target_compile_definitions(lemonirc PUBLIC -DLIRC_PRINT_ALL)
message(STATUS "LemonIRC verbose logging enabled.")
endif()
if (LIRC_BUILD_EXAMPLE)
add_executable(lirc_example example.c)
target_link_libraries(lirc_example lemonirc)
if (WIN32)
target_link_libraries(lirc_example ws2_32) # lmao windows wants winsock, cringe
endif()
message(STATUS "LemonIRC will build the example.")
endif()