mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
fix: follow external-packages for flatpak libdatachannel deps & add flatpak path to use source_dir
This commit is contained in:
Vendored
+16
-7
@@ -155,7 +155,7 @@ if (NOT _is_multi AND NOT CMAKE_BUILD_TYPE)
|
||||
endif ()
|
||||
|
||||
function(orcaslicer_add_cmake_project projectname)
|
||||
cmake_parse_arguments(P_ARGS "FORWARD_CONFIG" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
||||
cmake_parse_arguments(P_ARGS "FORWARD_CONFIG" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND;SOURCE_DIR" "CMAKE_ARGS" ${ARGN})
|
||||
|
||||
# MSVC is true for clang-cl as well, so the sub-build toolchain has to key on the
|
||||
# generator. A non-Visual-Studio superbuild passes its own generator down, and with
|
||||
@@ -196,12 +196,18 @@ function(orcaslicer_add_cmake_project projectname)
|
||||
set(_build_j "-j${NPROC}")
|
||||
endif ()
|
||||
|
||||
set(_source_dir_arg "")
|
||||
if (P_ARGS_SOURCE_DIR)
|
||||
set(_source_dir_arg SOURCE_DIR ${P_ARGS_SOURCE_DIR})
|
||||
endif ()
|
||||
|
||||
if (NOT IS_CROSS_COMPILE OR NOT APPLE)
|
||||
ExternalProject_Add(
|
||||
dep_${projectname}
|
||||
EXCLUDE_FROM_ALL ON
|
||||
INSTALL_DIR ${DESTDIR}
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
||||
${_source_dir_arg}
|
||||
${_gen}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
@@ -234,12 +240,14 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE)
|
||||
# note for future devs: shared libs may actually create a size reduction
|
||||
# but orcaslicer_deps tends to get really funny regarding linking after that (notably boost)
|
||||
# so, as much as I would like to use that, it's not happening
|
||||
ExternalProject_Add_Step(dep_${projectname} free_download_space
|
||||
DEPENDEES download # do after download
|
||||
COMMENT "Freeing Space: Removing source archive"
|
||||
WORKING_DIRECTORY ${DEP_DOWNLOAD_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf ${projectname}
|
||||
)
|
||||
if (NOT P_ARGS_SOURCE_DIR)
|
||||
ExternalProject_Add_Step(dep_${projectname} free_download_space
|
||||
DEPENDEES download # do after download
|
||||
COMMENT "Freeing Space: Removing source archive"
|
||||
WORKING_DIRECTORY ${DEP_DOWNLOAD_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf ${projectname}
|
||||
)
|
||||
endif ()
|
||||
ExternalProject_Add_Step(dep_${projectname} free_build_space
|
||||
DEPENDEES install # do after install
|
||||
COMMENT "Freeing Space: Removing source and build files"
|
||||
@@ -253,6 +261,7 @@ else()
|
||||
EXCLUDE_FROM_ALL ON
|
||||
INSTALL_DIR ${DESTDIR}
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
||||
${_source_dir_arg}
|
||||
${_gen}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
|
||||
Vendored
+6
-5
@@ -5,12 +5,13 @@
|
||||
# It vendors plog, usrsctp and libjuice as git submodules, which a plain
|
||||
# GitHub tag tarball does not include. The flatpak sandbox has no network
|
||||
# access during the build, so there the manifest itself clones the repo
|
||||
# (submodules and all) straight into this ExternalProject's default source
|
||||
# dir before the sandbox closes; with no download method given here and that
|
||||
# dir already non-empty, ExternalProject_Add silently uses it as-is instead
|
||||
# of trying its own (network) git step.
|
||||
# (submodules and all) into the dependency download directory before the
|
||||
# sandbox closes. ExternalProject_Add is pointed at that existing checkout
|
||||
# instead of being given its own network-dependent download method.
|
||||
if (FLATPAK)
|
||||
set(_datachannel_source "")
|
||||
set(_datachannel_source
|
||||
SOURCE_DIR ${DEP_DOWNLOAD_DIR}/DataChannel
|
||||
)
|
||||
else()
|
||||
set(_datachannel_source
|
||||
GIT_REPOSITORY https://github.com/paullouisageneau/libdatachannel.git
|
||||
|
||||
Reference in New Issue
Block a user