kerstezel-klant/CMakeLists.txt

26 lines
649 B
CMake
Raw Permalink Normal View History

cmake_minimum_required(VERSION 3.0)
2020-12-07 10:49:21 +00:00
project(kerstezel-klant)
2020-12-28 15:43:09 +00:00
option(SPOOF "Spoof interactions with the BCM2835 library (allows building on non-raspberry pi devices" OFF)
2020-12-07 10:49:21 +00:00
if (MSVC)
add_compile_options(/W4 /WX)
2020-12-07 10:49:21 +00:00
else()
add_compile_options(-Wall -Wextra -pedantic -Werror)
2020-12-07 10:49:21 +00:00
endif()
add_compile_definitions(LOG_PREFIX="${CMAKE_SOURCE_DIR}")
if(SPOOF)
add_compile_definitions(SPOOF)
endif()
2020-12-07 10:49:21 +00:00
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()
2020-12-08 07:19:20 +00:00
install(TARGETS kerstezel DESTINATION sbin)