Skip to content

Commit eae5007

Browse files
authored
Merge pull request #382 from garethsb/patch-7
Require CMake 3.24 when CMAKE_PROJECT_TOP_LEVEL_INCLUDES is specified
2 parents 2b53b76 + 3165bf7 commit eae5007

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Development/CMakeLists.txt

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
1+
# the injection point may be used to configure conan, but that requires CMake 3.24 or higher
2+
# so avoid confusion and reject invocations which attempt to use it on lower versions
3+
# see https://cmake.org/cmake/help/v3.24/variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html
4+
# the alternative is to run conan install first instead
5+
if(CMAKE_PROJECT_TOP_LEVEL_INCLUDES)
6+
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
7+
else()
8+
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
9+
endif()
210

311
# project name
412
project(nmos-cpp)

0 commit comments

Comments
 (0)