Skip to content

Commit

Permalink
2262: treat manual resource and image files in the same way
Browse files Browse the repository at this point in the history
  • Loading branch information
kduske committed Sep 19, 2019
1 parent 936b174 commit b11d1b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/cmake/GenerateManual.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ add_custom_command(OUTPUT ${DOC_MANUAL_TARGET_FILES_ABSOLUTE}

# Collect images and copy them to the correct locations
# DOC_MANUAL_SOURCE_IMAGE_FILES_ABSOLUTE contains the absolute paths to all source image files
# DOC_MANUAL_SOURCE_IMAGE_FILES_ABSOLUTE_RELATIVE contains the relative paths to all source image files, relative to DOC_MANUAL_IMAGES_SOURCE_DIR
# DOC_MANUAL_SOURCE_IMAGE_FILES_RELATIVE contains the relative paths to all source image files, relative to DOC_MANUAL_IMAGES_SOURCE_DIR
# DOC_MANUAL_TARGET_IMAGE_FILES_ABSOLUTE contains the absolute paths to all target image files (used for dependency tracking)

# Collect images
Expand All @@ -99,8 +99,8 @@ foreach(IMAGE_SOURCE_FILE_ABSOLUTE ${DOC_MANUAL_SOURCE_IMAGE_FILES_ABSOLUTE})
set(IMAGE_TARGET_FILE "${DOC_MANUAL_IMAGES_TARGET_DIR}/${IMAGE_FILE_NAME}")

file(RELATIVE_PATH IMAGE_SOURCE_FILE_RELATIVE "${DOC_MANUAL_IMAGES_SOURCE_DIR}" "${IMAGE_SOURCE_FILE_ABSOLUTE}")
set(DOC_MANUAL_SOURCE_IMAGE_FILES_ABSOLUTE_RELATIVE
${DOC_MANUAL_SOURCE_IMAGE_FILES_ABSOLUTE_RELATIVE}
set(DOC_MANUAL_SOURCE_IMAGE_FILES_RELATIVE
${DOC_MANUAL_SOURCE_IMAGE_FILES_RELATIVE}
"${IMAGE_SOURCE_FILE_RELATIVE}")

set(DOC_MANUAL_TARGET_IMAGE_FILES_ABSOLUTE
Expand All @@ -111,7 +111,7 @@ endforeach(IMAGE_SOURCE_FILE_ABSOLUTE)

# Copy the images using the relative paths (absolute paths would yield very long command lines which are then truncated by MSVC)
add_custom_command(OUTPUT ${DOC_MANUAL_TARGET_IMAGE_FILES_ABSOLUTE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DOC_MANUAL_SOURCE_IMAGE_FILES_ABSOLUTE_RELATIVE} "${DOC_MANUAL_IMAGES_TARGET_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DOC_MANUAL_SOURCE_IMAGE_FILES_RELATIVE} "${DOC_MANUAL_IMAGES_TARGET_DIR}"
DEPENDS "${DOC_MANUAL_IMAGES_TARGET_DIR}" ${DOC_MANUAL_SOURCE_IMAGE_FILES_ABSOLUTE}
WORKING_DIRECTORY "${DOC_MANUAL_IMAGES_SOURCE_DIR}"
COMMENT "Copying image files to ${DOC_MANUAL_IMAGES_TARGET_DIR}"
Expand Down

0 comments on commit b11d1b0

Please sign in to comment.