update deps

This commit is contained in:
QIDI TECH
2025-02-08 14:44:30 +08:00
parent 29f208134f
commit 4797f4743b
9 changed files with 48 additions and 153 deletions

View File

@@ -1,8 +1,8 @@
set(LibBGCode_SOURCE_DIR "" CACHE PATH "Optionally specify local LibBGCode source directory")
set(_source_dir_line
URL https://github.com/prusa3d/libbgcode/archive/b5c57c423c958a78dacae468aeee63ab3d2de947.zip
URL_HASH SHA256=ade82ffe9c1a1876c9d4d264948fa146d33d6a9c7cc23f6422fbbdb2949c5d75)
URL https://github.com/prusa3d/libbgcode/archive/d33a277a3ce2c0a7f9ba325caac6d730e0f7a412.zip
URL_HASH SHA256=0db3b0852df8d3ae32a4283884bc4ad6f1dd4d3c748ed679491f70b1e1d1acd5)
if (LibBGCode_SOURCE_DIR)
set(_source_dir_line "SOURCE_DIR;${LibBGCode_SOURCE_DIR};BUILD_ALWAYS;ON")

View File

@@ -1,4 +1,4 @@
# In QIDISlicer 2.6.0 we switched from https://github.com/memononen/nanosvg to its fork https://github.com/fltk/nanosvg
# In QIDISlicer 1.2.0 we switched from https://github.com/memononen/nanosvg to its fork https://github.com/fltk/nanosvg
# because this last implements the new function nsvgRasterizeXY() which we now use in GLTexture::load_from_svg()
# for rasterizing svg files from their original size to a squared power of two texture on Windows systems using
# AMD Radeon graphics cards

4
deps/CMakeLists.txt vendored
View File

@@ -1,4 +1,3 @@
#
# This CMake project downloads, configures and builds QIDISlicer dependencies on Unix and Windows.
#
# When using this script, it's recommended to perform an out-of-source build using CMake.
@@ -136,7 +135,6 @@ if (UNIX)
endif ()
endif ()
list(APPEND SYSTEM_PROVIDED_PACKAGES ${${PROJECT_NAME}_PLATFORM_PACKAGES})
list(REMOVE_DUPLICATES SYSTEM_PROVIDED_PACKAGES)
@@ -177,7 +175,7 @@ foreach (pkg ${FOUND_PACKAGES})
if (${pkg} IN_LIST SYSTEM_PROVIDED_PACKAGES)
check_system_package(${pkg} _checked_list)
elseif (TARGET dep_${pkg})
elseif (TARGET dep_${pkg})
get_target_property(_is_excluded_from_all dep_${pkg} EXCLUDE_FROM_ALL)
if (NOT _is_excluded_from_all)
list(APPEND DEPS_TO_BUILD ${pkg})

36
deps/README.md vendored Normal file
View File

@@ -0,0 +1,36 @@
# QIDISlicer dependencies
This folder is a top level CMake project to build the dependent libraries for QIDISlicer. It can be configured and built in the standard CMake way using the commands:
```
cmake ..
cmake --build .
```
Each dependency is specified in a separate folder prefixed with the `+` sign. The underlying framework to download and build external projects is CMake's ExternalProject module. No other tool (e.g. Python) is involved in the process.
All the standard CMake switches work as expected, -G<generator> for alternative build file generators like Ninja or Visual Studio projects.
Important toolchain configuration variables are forwarded to each package build script if they happen to be CMake based. Otherwise they
are forwarded to the appropriate build system of a particular library package.
## A note about build configurations on MSVC
To build QIDISlicer in different configurations with a Visual Studio toolchain, it is necessary to also build the dependencies in the appropriate configurations. As MSVC runtimes are not compatible between different build configurations, it's not possible to link a library built in Release mode to QIDISlicer being built in Debug mode. This fact applies to all libraries except those with proper C linkage and interface lacking any STL container (e.g. ZLIB). Many of the dependent libraries don't fall into this cathegory thus they need to be built twice: in Release and Debug versions.
The `DEP_DEBUG` flag is used to specify if Debug versions of the affected libraries will be built. If an MSVC toochain is used, this flag is ON by default and OFF for any other platform and compiler suite.
Note that it's not necessary to build the dependencies for each CMake build configuration (e.g. RelWithDebInfo). When QIDISlicer is built in such a configuration, a pure Debug or Release build of dependencies will be compatible with the main project. CMake should automatically choose the right configuration of the dependencies in such cases. This may not work in all cases (see https://stackoverflow.com/questions/24262081/cmake-relwithdebinfo-links-to-debug-libs).
## Automatic dependency build while configuring QIDISlicer
It is possible build the dependencies while configuring the main QIDISlicer project. To invoke this feature, configure QIDISlicer with the `-DQIDISlicer_BUILD_DEPS:BOOL=ON` flag. All the necessary arguments will be forwarded to the dependency build and the paths to finding the libraries (CMAKE_PREFIX_PATH) will automatically be set for the main project.
All that needs to be done to build the whole QIDISlicer project from scratch is to use the command
```
cmake --preset default -DQIDISlicer_BUILD_DEPS:BOOL=ON
```
in the top level source directory. This method makes use of presets which are a relatively new feature of CMake. To list the current available presets, use the
```
cmake --list-presets
```
command in the source directory where a CMakePresets.json file is available.