43 "COMPONENTSUBDIRECTORYGROUP" # possible lists
44 "" # no possible options
48 # special
case for components:
remove prefix
for the destination directory
49 string(REGEX REPLACE
"^component-|^component_|^action-|^action_|^library_|^library-" "" EXPORT_HEADER_DESTINATION ${EXPORT_HEADER_COMPONENT})
51 # define
where to install files
52 set(EXPORT_HEADER_INCLUDE_DIR ${CMAKE_BINARY_DIR}/
include/${CAMITK_SHORT_VERSION_STRING})
53 set(EXPORT_HEADER_INSTALL_ROOT ${CMAKE_INSTALL_PREFIX})
56 if(EXPORT_HEADER_GROUP)
58 if (NOT EXISTS ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_GROUP})
59 add_custom_command(TARGET ${EXPORT_HEADER_COMPONENT}
61 COMMAND ${CMAKE_COMMAND} -E make_directory ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_GROUP}
62 COMMENT
"Creating build-time group include dir ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_GROUP}" 66 set(EXPORT_HEADER_DESTINATION ${EXPORT_HEADER_GROUP}/${EXPORT_HEADER_DESTINATION})
69 # check that the directory exists otherwise create it 70 if (NOT EXISTS ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_DESTINATION})
71 add_custom_command(TARGET ${EXPORT_HEADER_COMPONENT}
73 COMMAND ${CMAKE_COMMAND} -E make_directory ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_DESTINATION}
74 COMMENT
"Creating build-time include dir ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_DESTINATION}" 79 # check the SUBDIRECTORY parameter 80 if(EXPORT_HEADER_SUBDIRECTORY)
81 set(EXPORT_HEADER_DESTINATION ${EXPORT_HEADER_DESTINATION}/${EXPORT_HEADER_SUBDIRECTORY})
82 # create subdirectory
if it does not exists
83 if (NOT EXISTS ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_DESTINATION})
84 add_custom_command(TARGET ${EXPORT_HEADER_COMPONENT}
86 COMMAND ${CMAKE_COMMAND} -E make_directory ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_DESTINATION}
87 COMMENT
"Creating build-time include subdir ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_DESTINATION}" 94 # at build time, copy the files to build directory include files when the target is built 95 foreach(HEADER ${EXPORT_HEADER_DEFAULT_ARGS})
96 # check
if file name is relative or not
97 set(FILE_TO_COPY ${HEADER})
99 # copy after build, only
if there was a change
100 add_custom_command(TARGET ${EXPORT_HEADER_COMPONENT}
102 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE_TO_COPY} ${EXPORT_HEADER_INCLUDE_DIR}/${EXPORT_HEADER_DESTINATION}/
103 COMMENT
"Installing build-time header ${HEADER}" 104 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
109 # during installation, copy the files to install directory 110 install(FILES ${EXPORT_HEADER_DEFAULT_ARGS}
111 # DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${CAMITK_SHORT_VERSION_STRING}/${EXPORT_HEADER_DESTINATION}/ 112 DESTINATION
include/${CAMITK_SHORT_VERSION_STRING}/${EXPORT_HEADER_DESTINATION}/
113 COMPONENT ${EXPORT_HEADER_COMPONENT}
export_headers()
export_headers is a macro that install header files at build and install time
Definition: ExportHeaders.h:40
parse_arguments()
macro parse_arguments is a fork from CMakeMacroParseArguments see http://www.cmake.org/Wiki/CMakeMacroParseArguments for more information
Definition: ParseArguments.h:13
static void include(QRect &r, const QRect &rect)
Definition: canvas_typed/qtcanvas.cpp:98