-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (23 loc) · 907 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.25)
project(sl_pi_cpp)
include(FetchContent)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(BUILD_SHARED_LIBS OFF)
#set(CMAKE_EXE_LINKER_FLAGS "-static")
find_package(WiringPi)
if(NOT ${wiringPi_FOUND})
include(cmake/GetWiringPi.cmake)
endif ()
include(cmake/Getu8g2.cmake)
include(cmake/GetTCLAP.cmake)
add_subdirectory(libsl)
set(CMAKE_CXX_STANDARD 20)
file(GLOB SOURCES "src/*.cpp" "src/*.c")
add_executable(sl_pi_cpp main.cpp ${SOURCES} include/U8G2_SSD1322_NHD_256X64_F_8080_RPi.h)
target_include_directories(sl_pi_cpp PRIVATE include)
target_link_libraries(sl_pi_cpp PRIVATE u8g2 wiringPi sl TCLAP)
target_compile_features(sl_pi_cpp PUBLIC cxx_std_20)
install(TARGETS sl_pi_cpp RUNTIME DESTINATION bin)
include(CPack)
# target_compile_options(sl_pi_cpp PRIVATE -fsanitize=address)
# target_link_options(sl_pi_cpp PRIVATE -fsanitize=address)