Add option to copy required plugins from LibPack to build directory
This commit is contained in:
@@ -59,6 +59,8 @@ macro(InitializeFreeCADBuildOptions)
|
||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/DLLs)
|
||||
set(COPY_LIBPACK_BIN_TO_BUILD ON )
|
||||
option(FREECAD_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build directory." OFF)
|
||||
# Copy only the minimum number of files to get a working application
|
||||
option(FREECAD_COPY_PLUGINS_BIN_TO_BUILD "Copy plugins to the build directory." OFF)
|
||||
endif()
|
||||
else()
|
||||
message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
|
||||
|
||||
@@ -234,6 +234,18 @@ macro(PrintFinalReport)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_BINARY_DIR})
|
||||
message("... done copying libpack 'bin' directory.\n=======================================\n")
|
||||
endif()
|
||||
if(FREECAD_COPY_PLUGINS_BIN_TO_BUILD)
|
||||
message(STATUS "=======================================\n"
|
||||
"Copying plugins to build directory.")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcess.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/bin/QtWebEngineProcessd.exe DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/translations/qtwebengine_locales DESTINATION ${CMAKE_BINARY_DIR}/translations)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREECAD_INSTALL_DEPEND_DIRS)
|
||||
|
||||
Reference in New Issue
Block a user