skullc-peripherals/CMakeLists.txt
Erki 6cf95e41ed
Some checks failed
CI & Unit Tests / Unit-Tests (push) Failing after 28s
CI & Unit Tests / Docs (push) Successful in 11s
initial commit
2024-03-05 20:27:32 +02:00

54 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
set(SKULLC_VERSION 0.1.0)
project(skullc
VERSION ${SKULLC_VERSION}
LANGUAGES
C
CXX
)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/)
option(SKULLC_WITH_TESTS "Enable unit testing." OFF)
option(SKULLC_WITH_HAL "Enable the compiling and deployment of the HAL dependent sections." OFF)
option(SKULLC_USE_HAL_ST "Enable the ST HAl when SKULLC_WITH_HAL is enabled." OFF)
option(SKULLC_USE_HAL_ESP "Enable the ESP HAL when SKULLC_WITH_HAL is enabled." OFF)
option(SKULLC_WITH_DOCS "Enable documentation building." OFF)
include(skullc-install)
add_subdirectory(Peripherals)
add_subdirectory(Utility)
add_subdirectory(Messaging)
if(SKULLC_WITH_TESTS)
enable_testing()
add_subdirectory(Tests)
endif()
if(SKULLC_WITH_DOCS)
add_subdirectory(Docs)
endif()
## Install
configure_file(skullc-config.cmake
"${CMAKE_BINARY_DIR}/skullc-config.cmake"
@ONLY
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_BINARY_DIR}/skullc-config-version.cmake"
VERSION ${version}
COMPATIBILITY AnyNewerVersion
)
install(
FILES
"${CMAKE_BINARY_DIR}/skullc-config.cmake"
DESTINATION lib/cmake/skullc
)