diff --git a/CMakeLists.txt b/CMakeLists.txt index 17ba96b..4fdaa8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,8 @@ # It is not actually needed for downstream use. # +cmake_minimum_required(VERSION 3.5) project(UseLatexMk) -cmake_minimum_required(VERSION 2.8) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}) include(UseLatexMk) diff --git a/README.md b/README.md index 9aa5f43..23ff07f 100644 --- a/README.md +++ b/README.md @@ -42,6 +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. Now, you are ready to use it! diff --git a/UseLatexMk.cmake b/UseLatexMk.cmake index 8fe428f..fbe76b5 100644 --- a/UseLatexMk.cmake +++ b/UseLatexMk.cmake @@ -203,11 +203,8 @@ function(add_latex_document) set(LATEXMKRC_OPTIONS ${LATEXMKRC_OPTIONS} -r ${LATEXMKRC_FILE}) endforeach() - # Add the BYPRODUCTS parameter, if the CMake version supports it - set(BYPRODUCTS_PARAMETER "") - if (CMAKE_VERSION VERSION_GREATER "3.2") - set(BYPRODUCTS_PARAMETER BYPRODUCTS ${OUTPUT_PDF}) - endif() + # Add the BYPRODUCTS parameter + set(BYPRODUCTS_PARAMETER BYPRODUCTS ${OUTPUT_PDF}) # Maybe allow latexmk the use of absolute paths set(ENV_COMMAND "")