summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-05-14 04:46:12 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-05-16 00:32:21 +0200
commitbfa3a90b73588be47dc3f4d373ff63ce17dfb6ab (patch)
tree7d8f06ea050fbf9c241c4ede6f82c7ba56e20a77
parent0c19587aec8428444d2878fc5e2c966613207f82 (diff)
downloadtde-cmake-bfa3a90b73588be47dc3f4d373ff63ce17dfb6ab.tar.gz
tde-cmake-bfa3a90b73588be47dc3f4d373ff63ce17dfb6ab.zip
Add CMake rules for installation as a standalone package.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 0846fa1cb7ca2f8df276849f75196efc0935b846)
-rw-r--r--CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..75584ae
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,33 @@
+#################################################
+#
+# (C) 2021 Slávek Banko
+# slavek.banko (at) axis.cz
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+## Process only if it is built as a standalone package
+if( "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" )
+
+##### general package setup #####################
+
+ cmake_minimum_required( VERSION 2.8.12 )
+ project( tde-cmake-rules )
+
+
+##### install TDE CMake files ###################
+
+ file( GLOB_RECURSE _modules
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules/* )
+ install( FILES ${_modules} DESTINATION ${CMAKE_ROOT}/Modules )
+
+ file( GLOB_RECURSE _templates
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/templates/* )
+ install( FILES ${_templates} DESTINATION ${CMAKE_ROOT}/Templates )
+
+endif()