mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +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 ()
|
endif ()
|
||||||
|
|
||||||
function(orcaslicer_add_cmake_project projectname)
|
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
|
# 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
|
# 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}")
|
set(_build_j "-j${NPROC}")
|
||||||
endif ()
|
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)
|
if (NOT IS_CROSS_COMPILE OR NOT APPLE)
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
dep_${projectname}
|
dep_${projectname}
|
||||||
EXCLUDE_FROM_ALL ON
|
EXCLUDE_FROM_ALL ON
|
||||||
INSTALL_DIR ${DESTDIR}
|
INSTALL_DIR ${DESTDIR}
|
||||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
||||||
|
${_source_dir_arg}
|
||||||
${_gen}
|
${_gen}
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
-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
|
# 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)
|
# 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
|
# so, as much as I would like to use that, it's not happening
|
||||||
ExternalProject_Add_Step(dep_${projectname} free_download_space
|
if (NOT P_ARGS_SOURCE_DIR)
|
||||||
DEPENDEES download # do after download
|
ExternalProject_Add_Step(dep_${projectname} free_download_space
|
||||||
COMMENT "Freeing Space: Removing source archive"
|
DEPENDEES download # do after download
|
||||||
WORKING_DIRECTORY ${DEP_DOWNLOAD_DIR}
|
COMMENT "Freeing Space: Removing source archive"
|
||||||
COMMAND ${CMAKE_COMMAND} -E rm -rf ${projectname}
|
WORKING_DIRECTORY ${DEP_DOWNLOAD_DIR}
|
||||||
)
|
COMMAND ${CMAKE_COMMAND} -E rm -rf ${projectname}
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
ExternalProject_Add_Step(dep_${projectname} free_build_space
|
ExternalProject_Add_Step(dep_${projectname} free_build_space
|
||||||
DEPENDEES install # do after install
|
DEPENDEES install # do after install
|
||||||
COMMENT "Freeing Space: Removing source and build files"
|
COMMENT "Freeing Space: Removing source and build files"
|
||||||
@@ -253,6 +261,7 @@ else()
|
|||||||
EXCLUDE_FROM_ALL ON
|
EXCLUDE_FROM_ALL ON
|
||||||
INSTALL_DIR ${DESTDIR}
|
INSTALL_DIR ${DESTDIR}
|
||||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
|
||||||
|
${_source_dir_arg}
|
||||||
${_gen}
|
${_gen}
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
-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
|
# It vendors plog, usrsctp and libjuice as git submodules, which a plain
|
||||||
# GitHub tag tarball does not include. The flatpak sandbox has no network
|
# GitHub tag tarball does not include. The flatpak sandbox has no network
|
||||||
# access during the build, so there the manifest itself clones the repo
|
# access during the build, so there the manifest itself clones the repo
|
||||||
# (submodules and all) straight into this ExternalProject's default source
|
# (submodules and all) into the dependency download directory before the
|
||||||
# dir before the sandbox closes; with no download method given here and that
|
# sandbox closes. ExternalProject_Add is pointed at that existing checkout
|
||||||
# dir already non-empty, ExternalProject_Add silently uses it as-is instead
|
# instead of being given its own network-dependent download method.
|
||||||
# of trying its own (network) git step.
|
|
||||||
if (FLATPAK)
|
if (FLATPAK)
|
||||||
set(_datachannel_source "")
|
set(_datachannel_source
|
||||||
|
SOURCE_DIR ${DEP_DOWNLOAD_DIR}/DataChannel
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
set(_datachannel_source
|
set(_datachannel_source
|
||||||
GIT_REPOSITORY https://github.com/paullouisageneau/libdatachannel.git
|
GIT_REPOSITORY https://github.com/paullouisageneau/libdatachannel.git
|
||||||
|
|||||||
@@ -326,16 +326,13 @@ modules:
|
|||||||
dest: external-packages/FFMPEG
|
dest: external-packages/FFMPEG
|
||||||
|
|
||||||
# libdatachannel v0.24.5
|
# libdatachannel v0.24.5
|
||||||
# Use git instead of archive: it vendors plog, usrsctp and libjuice as
|
# The Git checkout includes the submodules that are missing from the
|
||||||
# git submodules, which a plain GitHub tag tarball does not include.
|
# GitHub source archive. DataChannel.cmake consumes it as SOURCE_DIR.
|
||||||
# Cloned (with submodules) straight into the ExternalProject source dir
|
|
||||||
# that deps/DataChannel/DataChannel.cmake expects, since the sandboxed
|
|
||||||
# build step has no network to do this itself.
|
|
||||||
- type: git
|
- type: git
|
||||||
url: https://github.com/paullouisageneau/libdatachannel.git
|
url: https://github.com/paullouisageneau/libdatachannel.git
|
||||||
tag: v0.24.5
|
tag: v0.24.5
|
||||||
commit: 443f6934d9007eb7076ab7825ba330f355fcbead
|
commit: 443f6934d9007eb7076ab7825ba330f355fcbead
|
||||||
dest: deps/build_flatpak/dep_DataChannel-prefix/src/dep_DataChannel
|
dest: external-packages/DataChannel
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# Fallback archives for deps normally provided by the GNOME SDK.
|
# Fallback archives for deps normally provided by the GNOME SDK.
|
||||||
|
|||||||
Reference in New Issue
Block a user