From eb3695902374834dc31bc3ad7eb13d436e9e90da Mon Sep 17 00:00:00 2001 From: Snaipe Date: Wed, 18 Nov 2015 13:20:03 +0100 Subject: [PATCH] Fixed cmake header file installation flattening include subdirectories --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21e630e..8c70e05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -247,7 +247,11 @@ if (COVERALLS) coveralls_setup("${SOURCE_FILES}" ${COVERALLS_UPLOAD}) endif() -install(FILES ${INTERFACE_FILES} DESTINATION include/criterion) +foreach (F ${INTERFACE_FILES}) + get_filename_component(DEST "${F}" DIRECTORY) + install(FILES "${F}" DESTINATION "${DEST}") +endforeach () + install(TARGETS criterion RUNTIME DESTINATION bin LIBRARY DESTINATION lib