From 6c9b368b9973892c91315dd09fdfd782eddebca8 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 9 Apr 2024 17:51:45 +0200 Subject: [PATCH] Data: Consistent data path During the build process the example files are copied to the hardcoded path 'data/examples' while for the installed files '/examples' is used. On Linux systems the value of the CMake variable is 'share' so that there is an inconsistency between compiled and installed version. --- data/examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/examples/CMakeLists.txt b/data/examples/CMakeLists.txt index 8bda04eafb..f0930ab3c3 100644 --- a/data/examples/CMakeLists.txt +++ b/data/examples/CMakeLists.txt @@ -18,7 +18,7 @@ ADD_CUSTOM_TARGET(Example_data ALL # 0001097: CMake stops with error "Circular ... <- ... dependency dropped." if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") - fc_copy_sources(Example_data "${CMAKE_BINARY_DIR}/data/examples" ${Examples_Files}) + fc_copy_sources(Example_data "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/examples" ${Examples_Files}) endif() if (WIN32 AND FREECAD_LIBPACK_USE)