summaryrefslogtreecommitdiff
path: root/CMake/Misc.cmake
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-09-01 00:53:40 +0200
committerJulian Andres Klode <jak@debian.org>2016-09-01 00:53:40 +0200
commit265c3312bd1b329dc9b54c754da46621d9019c11 (patch)
treee1c740747f84f793ee2b6ab4ffaffbc9f76cd575 /CMake/Misc.cmake
parent28f0867d99398a23296ead313112402c51d4e876 (diff)
parent317bb39f3cd6626c74f25d7bdf2907f1b235f553 (diff)
Merge tag '1.3_rc3' into ubuntu/master
apt Debian release 1.3~rc3
Diffstat (limited to 'CMake/Misc.cmake')
-rw-r--r--CMake/Misc.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMake/Misc.cmake b/CMake/Misc.cmake
index 68ab22758..82cb4da37 100644
--- a/CMake/Misc.cmake
+++ b/CMake/Misc.cmake
@@ -86,3 +86,16 @@ function(path_join out path1 path2)
set(${out} "${path1}/${path2}" PARENT_SCOPE)
endif()
endfunction()
+
+# install_empty_directories(path ...)
+#
+# Creates empty directories in the install destination dir. Paths may be
+# absolute or relative; in the latter case, the value of CMAKE_INSTALL_PREFIX
+# is prepended.
+function(install_empty_directories)
+ foreach(path ${ARGN})
+ path_join(full_path "${CMAKE_INSTALL_PREFIX}" "${path}")
+ INSTALL(CODE "MESSAGE(STATUS \"Creating directory: \$ENV{DESTDIR}${full_path}\")"
+ CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${full_path})")
+ endforeach()
+endfunction()