diff options
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 66a79a59..e04db662 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -73,8 +73,11 @@ function(opentrack_boilerplate__ n files_ no-library_ static_ no-compat_ compile endif() add_library(${n} ${link-mode} ${files_}) set(all-files ${${n}-c} ${${n}-res} ${${n}-ui} ${${n}-rc}) - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" DESTINATION "${opentrack-doc-src-pfx}/${n}") - install(FILES ${all-files} DESTINATION "${opentrack-doc-src-pfx}/${n}") + file(RELATIVE_PATH subdir ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + foreach (i ${all-files}) + install(FILES "${i}" DESTINATION "${opentrack-doc-src-pfx}/${subdir}") + endforeach() + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" DESTINATION "${opentrack-doc-src-pfx}/${subdir}") message(STATUS "module ${n}") endif() if(NOT no-library_) |