summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-14 13:18:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-14 13:18:55 +0200
commit71b09cbdb0e86f8ae3349925359a511cd6134372 (patch)
treeffea4274a6741390573b31cf5a9881c8f669e1bd /cmake
parent7e859a41b16e75ed3b96255aec45c72f716c0328 (diff)
cmake: install source code to right directories
Diffstat (limited to 'cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake7
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_)