diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fdaa8a..2af8669 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # It is not actually needed for downstream use. # -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(UseLatexMk) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}) diff --git a/README.md b/README.md index 23ff07f..62fbba3 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ You just need to * copy all the CMake modules (`*.cmake`) from this project into your project * Include them with `include(UseLatexMk)`. This is best done from the top-level directory of your project, to make the `clean_latex` target available on that level. -* Use CMake 3.5 or newer. +* Use CMake 3.10 or newer. Now, you are ready to use it! diff --git a/UseLatexMk.cmake b/UseLatexMk.cmake index c7b48ec..8dde80c 100644 --- a/UseLatexMk.cmake +++ b/UseLatexMk.cmake @@ -103,6 +103,11 @@ # include_guard(GLOBAL) +# ensure CMake version is recent enough +if(CMAKE_VERSION VERSION_LESS 3.10) + message(FATAL_ERROR "UseLatexMk.cmake requires CMake 3.10 or newer") +endif() + # Find LATEX and LatexMk find_package(LATEX) find_package(LatexMk)