view 3rdparty/vmime/cmake/Utils.cmake @ 0:a4671277546c tip

created the repository for the thymian project
author ferencd
date Tue, 17 Aug 2021 11:19:54 +0200
parents
children
line wrap: on
line source

# Installing headers and preserving the directory structure
# Found here: http://www.semipol.de/archives/251
MACRO(INSTALL_HEADERS_WITH_DIRECTORY HEADER_LIST COMPONENT_NAME REMOVE_PREFIX)

	FOREACH(HEADER ${${HEADER_LIST}})
		STRING(REGEX MATCH "(.*)[/\\]" DIR ${HEADER})
		STRING(REPLACE "${CMAKE_SOURCE_DIR}/${REMOVE_PREFIX}" "" DIR ${DIR})
		INSTALL(FILES ${HEADER} DESTINATION include/${DIR} COMPONENT ${COMPONENT_NAME})
	ENDFOREACH(HEADER)

ENDMACRO(INSTALL_HEADERS_WITH_DIRECTORY)