mirror of
https://github.com/prusa3d/PrusaSlicer.git
synced 2026-11-26 23:29:07 +00:00
Add strawberry perl to deps
This commit is contained in:
parent
4ed2c43ce7
commit
09b4e5cf7d
2 changed files with 40 additions and 3 deletions
21
deps/+OpenSSL/OpenSSL.cmake
vendored
21
deps/+OpenSSL/OpenSSL.cmake
vendored
|
|
@ -15,17 +15,31 @@ else ()
|
|||
set(_exclude_from_all OFF)
|
||||
endif ()
|
||||
|
||||
set(_openssl_depends "")
|
||||
|
||||
if (WIN32)
|
||||
# OpenSSL is not needed by PrusaSlicer itself on Windows, but Paho MQTT links it on every
|
||||
# platform, so the Windows build (Perl Configure + nmake) has to be available here.
|
||||
find_package(Perl REQUIRED)
|
||||
set(_conf_cmd ${PERL_EXECUTABLE} Configure)
|
||||
#
|
||||
# OpenSSL's Configure needs a native Windows Perl. It is fetched as a pinned portable
|
||||
# Strawberry Perl by StrawberryPerl.cmake. It lives in a separate file on purpose: the
|
||||
# flatpak manifest generator in PrusaSlicer-Actions takes the first URL it finds in
|
||||
# OpenSSL.cmake as the OpenSSL source archive, so this file must contain only that one.
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/StrawberryPerl.cmake)
|
||||
set(_openssl_depends dep_Perl)
|
||||
|
||||
set(_conf_cmd ${_perl_exe} Configure)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_cross_arch "VC-WIN64A")
|
||||
else ()
|
||||
set(_cross_arch "VC-WIN32")
|
||||
endif ()
|
||||
set(_extra_conf_flags no-asm)
|
||||
# Explicitly set the tools, so they match the other deps.
|
||||
set(_extra_conf_flags no-asm no-module no-apps no-tests
|
||||
"CC=${CMAKE_C_COMPILER}"
|
||||
"LD=${CMAKE_LINKER}"
|
||||
"AR=${CMAKE_AR}"
|
||||
)
|
||||
set(_bld_cmd nmake)
|
||||
set(_ins_cmd nmake install_sw)
|
||||
elseif (APPLE)
|
||||
|
|
@ -83,4 +97,5 @@ ExternalProject_Add(dep_OpenSSL
|
|||
${_apple_target_flags}
|
||||
BUILD_COMMAND ${_bld_cmd}
|
||||
INSTALL_COMMAND ${_ins_cmd}
|
||||
DEPENDS ${_openssl_depends}
|
||||
)
|
||||
|
|
|
|||
22
deps/+OpenSSL/StrawberryPerl.cmake
vendored
Normal file
22
deps/+OpenSSL/StrawberryPerl.cmake
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Portable Strawberry Perl for building OpenSSL on Windows. Only ever included from
|
||||
# OpenSSL.cmake, on WIN32.
|
||||
#
|
||||
# OpenSSL's Configure needs a native Windows Perl. Do not search PATH for one: the Perl
|
||||
# bundled with Git for Windows gets picked up on many machines and it is a stripped MSYS
|
||||
# build that lacks core modules and treats paths the POSIX way, which breaks VC-* targets.
|
||||
# Fetch a pinned portable Strawberry Perl as a dependency instead, so the build is
|
||||
# self-contained and reproducible for anyone building the deps.
|
||||
#
|
||||
# Not a "+Perl" package directory by design: it is a build tool, not a library, and must
|
||||
# not show up in the flatpak manifest, which is generated from the +<name> directories.
|
||||
ExternalProject_Add(dep_Perl
|
||||
EXCLUDE_FROM_ALL ON
|
||||
URL "https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54051_64bit/strawberry-perl-5.40.5.1-64bit-portable.zip"
|
||||
URL_HASH SHA256=6619fe7eeef921ccddb4aac3972fb602a0c690a3074205b863ade998d7bc79a6
|
||||
DOWNLOAD_DIR ${${PROJECT_NAME}_DEP_DOWNLOAD_DIR}/Perl
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_Get_Property(dep_Perl SOURCE_DIR)
|
||||
set(_perl_exe "${SOURCE_DIR}/perl/bin/perl.exe")
|
||||
Loading…
Add table
Reference in a new issue