]> Creatis software - bbtkGEditor.git/blob - cmake/UserMacros.cmake
#feature 1359
[bbtkGEditor.git] / cmake / UserMacros.cmake
1 #========================================================================
2 # MACRO WHICH COPIES ALL IMAGES (png, jpg, gif) 
3 # FROM SOURCE TREE TO DOC BUILD TREE
4 # AND INSTALL THEM IN BBTK DOC TREE
5 MACRO(USER_DOC_INSTALL_IMAGES DOC_RELATIVE_INSTALL_PATH)
6   MESSAGE(STATUS "* Copying png,jpg,tif images in ${BBTK_DOC_BUILD_PATH}/${DOC_RELATIVE_INSTALL_PATH}")
7   FILE(GLOB PNG_IMAGES "*.png")
8   FILE(GLOB JPG_IMAGES "*.jpg")
9   FILE(GLOB TIF_IMAGES "*.tif")
10   SET(IMAGES
11     ${PNG_IMAGES}
12     ${JPG_IMAGES}
13     ${TIF_IMAGES}
14     )
15 #    MESSAGE(ERROR ${IMAGES} )
16   FOREACH(image ${IMAGES})  
17     GET_FILENAME_COMPONENT(filename "${image}" NAME)
18     CONFIGURE_FILE(
19       ${image}
20        ${${PROJECT_NAME}_DOC_BUILD_PATH}/${DOC_RELATIVE_INSTALL_PATH}/${filename}
21       COPYONLY
22       ) 
23       
24     #  IF (WIN32)
25 #       CONFIGURE_FILE(
26 #          ${image}
27 #          ${CMAKE_CURRENT_BINARY_DIR}/${filename}
28 #          COPYONLY
29 #         )
30 #      ENDIF(WIN32)
31     # MESSAGE(ERROR "${image} (${filename}) in :  ${PROJECT_BINARY_DIR}/${BBTK_DOC_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}/${filename}")
32   ENDFOREACH(image)
33   INSTALL( 
34       FILES ${IMAGES} 
35       DESTINATION ${${PROJECT_NAME}_DOC_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}
36     )  
37 ENDMACRO(USER_DOC_INSTALL_IMAGES)