vmime/cmake/Utils.cmake

14 lines
459 B
CMake
Raw Normal View History

# Installing headers and preserving the directory structure
# Found here: http://www.semipol.de/archives/251
MACRO(INSTALL_HEADERS_WITH_DIRECTORY HEADER_LIST COMPONENT_NAME)
FOREACH(HEADER ${${HEADER_LIST}})
STRING(REGEX MATCH "(.*)[/\\]" DIR ${HEADER})
STRING(REPLACE "${CMAKE_SOURCE_DIR}/" "" DIR ${DIR})
INSTALL(FILES ${HEADER} DESTINATION include/${DIR} COMPONENT ${COMPONENT_NAME})
ENDFOREACH(HEADER)
ENDMACRO(INSTALL_HEADERS_WITH_DIRECTORY)