-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
31 lines (24 loc) · 827 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
31 lines (24 loc) · 827 Bytes
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.14)
project(ArduinoLibrarySkeleton LANGUAGES CXX)
add_library(ArduinoLibrarySkeleton STATIC
src/ArduinoLibrarySkeleton.cpp
)
# Set C++ standard for this target
target_compile_features(ArduinoLibrarySkeleton PUBLIC cxx_std_17)
# Add compiler options
target_compile_options(ArduinoLibrarySkeleton PRIVATE -Wall -Werror -pedantic)
# Include directories
target_include_directories(ArduinoLibrarySkeleton PUBLIC src)
# Installation rules (optional)
install(TARGETS ArduinoLibrarySkeleton
EXPORT ArduinoLibrarySkeletonTargets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(DIRECTORY src/
DESTINATION include
FILES_MATCHING PATTERN "*.h"
)
# Export rules (optional)
export(TARGETS ArduinoLibrarySkeleton FILE ArduinoLibrarySkeletonConfig.cmake)