Skip to content

Commit

Permalink
Merge pull request #13 from gruenich/feature/require-cmake-3.5
Browse files Browse the repository at this point in the history
Require CMake version 3.5 or newer.
  • Loading branch information
dokempf authored Nov 22, 2023
2 parents b27f1ac + 6b86bac commit 7922306
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down
7 changes: 2 additions & 5 deletions UseLatexMk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Expand Down

0 comments on commit 7922306

Please sign in to comment.