summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-install.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-24 17:05:49 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-24 17:05:49 +0100
commit857ade6d3ea723f5caa0c63632f855eb6e9eacee (patch)
treed26a2be2d9e1db7f61099dd3a9da2271dcfb197f /cmake/opentrack-install.cmake
parent8e7c72ce68c8b1dbb79cf32c96b25f1b8b57ab6e (diff)
cmake: install program sources more robustly
Before it skipped some subdirectory parts.
Diffstat (limited to 'cmake/opentrack-install.cmake')
-rw-r--r--cmake/opentrack-install.cmake17
1 files changed, 8 insertions, 9 deletions
diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake
index 4762c5f7..df9e38fc 100644
--- a/cmake/opentrack-install.cmake
+++ b/cmake/opentrack-install.cmake
@@ -13,6 +13,14 @@ macro(opentrack_inst_dir path)
)
endmacro()
+function(install_sources)
+ get_property(source-dirs GLOBAL PROPERTY opentrack-all-source-dirs)
+ foreach(k ${source-dirs})
+ file(RELATIVE_PATH dest "${CMAKE_SOURCE_DIR}" "${k}")
+ opentrack_inst_dir("${opentrack-doc-src-pfx}" "${dest}")
+ endforeach()
+endfunction()
+
opentrack_inst_dir("${opentrack-doc-pfx}" ${CMAKE_SOURCE_DIR}/3rdparty-notices)
opentrack_inst_dir("${opentrack-doc-pfx}" "${CMAKE_SOURCE_DIR}/settings" "${CMAKE_SOURCE_DIR}/contrib")
opentrack_inst_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/cmake")
@@ -39,15 +47,6 @@ opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.t
opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt")
opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")
-function(opentrack_install_sources n)
- opentrack_sources(${n} sources)
- file(RELATIVE_PATH subdir "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
- foreach (i ${sources})
- opentrack_inst2("${opentrack-doc-src-pfx}/${subdir}" FILES "${i}")
- endforeach()
- opentrack_inst2("${opentrack-doc-src-pfx}/${subdir}" FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt")
-endfunction()
-
function(merge_translations)
set(all-deps "")