Skip to content

Commit

Permalink
Replace CMAKE_SOURCE_DIR by PROJECT_SOURCE_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Praetorius authored and gruenich committed Nov 22, 2023
1 parent 330208b commit 3bb582e
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 @@ -112,9 +112,9 @@ find_file(LATEXMKRC_TEMPLATE
latexmkrc.cmake
HINTS ${CMAKE_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/cmake
${CMAKE_SOURCE_DIR}/cmake/modules
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/cmake
${PROJECT_SOURCE_DIR}/cmake/modules
NO_CMAKE_FIND_ROOT_PATH
)

Expand Down Expand Up @@ -146,7 +146,7 @@ function(add_latex_document)
if(NOT LMK_TARGET)
# Construct a nice target name from the source file
get_filename_component(LMK_TARGET ${LMK_SOURCE} ABSOLUTE)
file(RELATIVE_PATH LMK_TARGET ${CMAKE_SOURCE_DIR} ${LMK_TARGET})
file(RELATIVE_PATH LMK_TARGET ${PROJECT_SOURCE_DIR} ${LMK_TARGET})
string(REPLACE "/" "_" LMK_TARGET ${LMK_TARGET})
string(REPLACE "." "_" LMK_TARGET ${LMK_TARGET})
endif()
Expand Down

0 comments on commit 3bb582e

Please sign in to comment.