[education/rkward] rkward: Inability to create symlinks should not be fatal (Windows 8.1)
Thomas Friedrichsmeier
null at kde.org
Sat Jun 25 10:18:35 BST 2022
Git commit 5b718396f597aa43d1382124beac70e2b491099c by Thomas Friedrichsmeier.
Committed on 25/06/2022 at 09:18.
Pushed by tfry into branch 'master'.
Inability to create symlinks should not be fatal (Windows 8.1)
M +7 -2 rkward/CMakeLists.txt
https://invent.kde.org/education/rkward/commit/5b718396f597aa43d1382124beac70e2b491099c
diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
index a41f1298..99eaad04 100644
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@ -78,13 +78,18 @@ ENDIF(KF5Crash_FOUND)
INSTALL(DIRECTORY plugins/ pages DESTINATION ${DATA_INSTALL_DIR}/rkward)
INSTALL(FILES resource.ver DESTINATION ${DATA_INSTALL_DIR}/rkward)
# This is for running directly from the build tree.
-ADD_CUSTOM_TARGET(local_install ALL
+EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/pages ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/pages
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/plugins ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/plugins
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/resource.ver ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/resource.ver
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/scriptbackends ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/phpfiles
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_BINARY_DIR}/rbackend/rpackages ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/rpackages)
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_BINARY_DIR}/rbackend/rpackages ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/rpackages
+ RESULT_VARIABLE SYMLINKS_FAILED
+)
+IF(SYMLINKS_FAILED)
+ MESSAGE(WARNING "Failed to create symbolic links inside build tree. This is ok in a regular installation, but running from the build tree will fail (i.e. tests will fail).")
+ENDIF(SYMLINKS_FAILED)
IF(APPLE)
More information about the rkward-tracker
mailing list