mirror of
https://github.com/OpenAMP/libmetal.git
synced 2026-02-05 19:26:31 +08:00
We currently support an old version of CMake (3.0.2) that was released in 2018. This requires adding specific policies to support the evolution to the latest versions of Zephyr. Update the minimum version to 3.16. The reason for this version is to support environments such as Debian Bullseye that are still in LTS state. By updating to CMake 3.16 as the minimum version, we can also clean up the following policy add-ons: - CMP0048 added in CMake v3.0 - CMP0053 added in CMake v3.1 - CMP0077 added in CMake v3.13 Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
39 lines
756 B
CMake
39 lines
756 B
CMake
cmake_minimum_required (VERSION 3.16)
|
|
|
|
set (LIBMETAL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
list (APPEND CMAKE_MODULE_PATH
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/platforms")
|
|
|
|
include (syscheck)
|
|
project (metal C)
|
|
|
|
include (CheckIncludeFiles)
|
|
include (CheckCSourceCompiles)
|
|
include (collect)
|
|
include (options)
|
|
include (depends)
|
|
|
|
foreach(_inc_path ${CMAKE_INCLUDE_PATH})
|
|
collect (PROJECT_INC_DIRS "${_inc_path}")
|
|
endforeach()
|
|
|
|
enable_testing ()
|
|
|
|
add_subdirectory (lib)
|
|
|
|
if (WITH_TESTS)
|
|
add_subdirectory (test)
|
|
endif (WITH_TESTS)
|
|
|
|
if (WITH_DOC)
|
|
add_subdirectory (doc)
|
|
endif (WITH_DOC)
|
|
|
|
if (WITH_EXAMPLES)
|
|
add_subdirectory (examples)
|
|
endif (WITH_EXAMPLES)
|
|
|