kerstezel-klant/CMakeLists.txt
2020-12-28 16:43:09 +01:00

26 lines
649 B
CMake

cmake_minimum_required(VERSION 3.0)
project(kerstezel-klant)
option(SPOOF "Spoof interactions with the BCM2835 library (allows building on non-raspberry pi devices" OFF)
if (MSVC)
add_compile_options(/W4 /WX)
else()
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()
add_compile_definitions(LOG_PREFIX="${CMAKE_SOURCE_DIR}")
if(SPOOF)
add_compile_definitions(SPOOF)
endif()
set(KERSTEZEL_SOURCES src/kerstezel.c)
set(KERSTEZEL_HEADERS src/kerstezel.h)
add_executable(kerstezel ${KERSTEZEL_SOURCES} ${KERSTEZEL_HEADERS})
if(NOT SPOOF)
target_link_libraries(kerstezel -lbcm2835)
endif()
install(TARGETS kerstezel DESTINATION sbin)