Skip to content

Commit

Permalink
Re #6897. Adding image copying to cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Apr 23, 2013
1 parent b073c4e commit f9abb74
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Code/Mantid/docs/qtassistant/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if (QT_QCOLLECTIONGENERATOR_EXECUTABLE)
set (HELP_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/qtassistant)
set (HELP_QCH_DIR ${HELP_OUT_DIR}/qch)
set (HELP_HTML_DIR ${HELP_OUT_DIR}/html)
set (HELP_HTML_IMG_DIR ${HELP_HTML_DIR}/img)
set (HELP_IMG_DIR ${HELP_OUT_DIR}/src/images)

message (STATUS "Adding information for qtassistant")
Expand All @@ -23,6 +24,22 @@ if (QT_QCOLLECTIONGENERATOR_EXECUTABLE)
${HELP_HTML_DIR}/developers.html
)

# copy over images - this just globs things in the images sub-directory
file ( GLOB_RECURSE IMAGES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/images
"*.png" )
file ( GLOB_RECURSE IMAGES_jpg
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/images
"*.jpg" )
list ( APPEND IMAGES ${IMAGES_jpg})
file ( GLOB_RECURSE IMAGES_PNG
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/images
"*.PNG" )
list ( APPEND IMAGES ${IMAGES_PNG})
#message ( "QTASSISTANT_IMAGES ${IMAGES}")
copy_python_files_to_dir("${IMAGES}" "${CMAKE_CURRENT_SOURCE_DIR}/images" ${HELP_HTML_IMG_DIR} INSTALL_IMAGES)

# copy the other generic stuff
add_custom_command( OUTPUT ${HELP_IMG_DIR}/Mantid_Logo_Transparent.png
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${CMAKE_SOURCE_DIR}/Images/Mantid_Logo_Transparent.png
${HELP_IMG_DIR}/Mantid_Logo_Transparent.png
Expand Down Expand Up @@ -83,13 +100,13 @@ if (QT_QCOLLECTIONGENERATOR_EXECUTABLE)
${HELP_HTML_DIR}/fitfunctions_index.html )

add_custom_command(OUTPUT ${HELP_ALGO_OUT}
DEPENDS make_algorithms_help.py qhpfile.py algorithm_help.py htmlwriter.py mediawiki.py Algorithms
DEPENDS make_algorithms_help.py qhpfile.py algorithm_help.py htmlwriter.py mediawiki.py ${INSTALL_IMAGES} Algorithms
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/make_algorithms_help.py
-m ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR} -o ${HELP_OUT_DIR}
)

add_custom_command(OUTPUT ${HELP_FIT_OUT}
DEPENDS make_fitfunctions_help.py qhpfile.py fitfunctions_help.py CurveFitting
DEPENDS make_fitfunctions_help.py qhpfile.py fitfunctions_help.py ${INSTALL_IMAGES} CurveFitting
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/make_fitfunctions_help.py
-m ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR} -o ${HELP_OUT_DIR}
)
Expand Down

0 comments on commit f9abb74

Please sign in to comment.