Skip to content

Commit

Permalink
Fix handling of By-products
Browse files Browse the repository at this point in the history
The file name might be altered to support package minted.
  • Loading branch information
gruenich committed Dec 9, 2023
1 parent 52fe0d5 commit 1c06d39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions UseLatexMk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ function(add_latex_document)
endif()
endif()

# Determine the output name
get_filename_component(output ${LMK_SOURCE} NAME_WE)
set(OUTPUT_PDF ${CMAKE_CURRENT_BINARY_DIR}/${output}.pdf)

# Inspect the EXCLUDE_FROM_ALL option
if(LMK_EXCLUDE_FROM_ALL)
set(ALL_OPTION "")
Expand Down Expand Up @@ -228,6 +224,10 @@ function(add_latex_document)
endif()
configure_file(${LMK_SOURCE} ${LMK_SOURCE_REPLACED} @ONLY)

# Determine the output name
get_filename_component(output ${LMK_SOURCE_REPLACED} NAME_WE)
set(OUTPUT_PDF ${CMAKE_CURRENT_BINARY_DIR}/${output}.pdf)

# Call the latexmk executable
# NB: Using add_custom_target here results in the target always being outofdate.
# This offloads the dependency tracking from cmake to latexmk. This is an
Expand Down

0 comments on commit 1c06d39

Please sign in to comment.