[education/rkward] rkward: Merge branch 'master' into work/dynamic_completions

Thomas Friedrichsmeier null at kde.org
Wed Oct 5 16:33:03 BST 2022


Git commit e8c40efe7f3d687f7dd421d3bad53626c6ac3e66 by Thomas Friedrichsmeier.
Committed on 03/10/2022 at 19:22.
Pushed by tfry into branch 'master'.

Merge branch 'master' into work/dynamic_completions

M  +19   -12   rkward/CMakeLists.txt

https://invent.kde.org/education/rkward/commit/e8c40efe7f3d687f7dd421d3bad53626c6ac3e66

diff --cc rkward/CMakeLists.txt
index fbfc4d7c,6891a0f9..f526f8e4
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@@ -77,18 -77,22 +77,23 @@@ ENDIF(KF5Crash_FOUND
  
  INSTALL(DIRECTORY plugins/ pages DESTINATION ${DATA_INSTALL_DIR}/rkward)
  INSTALL(FILES resource.ver DESTINATION ${DATA_INSTALL_DIR}/rkward)
- IF(NOT WIN32)
- 	# This is for running directly from the build tree. Not on windows for now (until cmake supports symlinks, there)
- 	ADD_CUSTOM_TARGET(local_install ALL
- 		COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall
- 		COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/icons ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/icons
- 		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
- 	)
- ENDIF(NOT WIN32)
+ # This is for running directly from the build tree.
+ EXECUTE_PROCESS(
+ 	COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall
+ 	COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/rbackend/rpackages # populated later during the build
+ )
+ EXECUTE_PROCESS(
++	COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/icons ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/icons
+ 	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
+ 	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