aboutsummaryrefslogtreecommitdiff
path: root/cmake/CheckFileSystemSymlinkSupport.cmake
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2018-05-20 20:08:43 +0200
committerAhmad Fatoum <ahmad@a3f.at>2018-05-21 01:08:29 +0200
commitff55af14f98fc70895ccdbbb4dccdccd68dec9dd (patch)
treeb0169c4f578be6c7babb3964110d06963755c235 /cmake/CheckFileSystemSymlinkSupport.cmake
parentae26e083b4471f1404e4f25eee71e4f71e9b13f0 (diff)
downloadraylib-ff55af14f98fc70895ccdbbb4dccdccd68dec9dd.tar.gz
raylib-ff55af14f98fc70895ccdbbb4dccdccd68dec9dd.zip
CMake: Move reusable code to new cmake/ directory
Diffstat (limited to 'cmake/CheckFileSystemSymlinkSupport.cmake')
-rw-r--r--cmake/CheckFileSystemSymlinkSupport.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/CheckFileSystemSymlinkSupport.cmake b/cmake/CheckFileSystemSymlinkSupport.cmake
new file mode 100644
index 00000000..798840ef
--- /dev/null
+++ b/cmake/CheckFileSystemSymlinkSupport.cmake
@@ -0,0 +1,13 @@
+# Populates a ${FILESYSTEM_LACKS_SYMLINKS} variable
+message(STATUS "Testing if file system supports symlinks")
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -E create_symlink CMakeLists.txt "${CMAKE_CURRENT_BINARY_DIR}/TestingIfSymlinkWorks"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ RESULT_VARIABLE FILESYSTEM_LACKS_SYMLINKS
+)
+If (FILESYSTEM_LACKS_SYMLINKS)
+ message(STATUS "Testing if file system supports symlinks -- unsupported")
+else()
+ message(STATUS "Testing if file system supports symlinks -- supported")
+endif()
+