aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules/CreateSymlink.cmake
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2016-02-17 12:08:51 +0100
committerPiotr Krysik <ptrkrysik@gmail.com>2016-02-17 12:08:51 +0100
commit5c7a578e4fd8a55e7db15788a6cc6a04486e2a34 (patch)
tree64847edbde0b16f65b5ddcd72aad4eab39b6e833 /cmake/Modules/CreateSymlink.cmake
parent7185b6664fc86e5ad75d0e1da9b2b0a5eebd20ae (diff)
Tiding up cmake code for creating symbolic links
Diffstat (limited to 'cmake/Modules/CreateSymlink.cmake')
-rw-r--r--cmake/Modules/CreateSymlink.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/Modules/CreateSymlink.cmake b/cmake/Modules/CreateSymlink.cmake
new file mode 100644
index 0000000..574c443
--- /dev/null
+++ b/cmake/Modules/CreateSymlink.cmake
@@ -0,0 +1,10 @@
+#create logical links in order to keep legacy names of apps
+macro(CREATE_SYMLINK _source _dest)
+ set(source ${CMAKE_CURRENT_SOURCE_DIR}/${_source})
+ set(dest ${CMAKE_CURRENT_BINARY_DIR}/${_dest})
+ list(APPEND symlinks ${dest})
+ add_custom_command(
+ DEPENDS ${source} OUTPUT ${dest}
+ COMMAND ln -sf ${_source} ${_dest}
+ )
+endmacro(CREATE_SYMLINK)