mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-10 15:25:18 -06:00
Moved the remaining Perl dependencies to xs/CMakeLists.txt
This commit is contained in:
parent
b28047af5e
commit
8e1b5157b4
5 changed files with 105 additions and 27 deletions
|
@ -1,5 +1,30 @@
|
|||
project(XS)
|
||||
|
||||
# Find the Perl interpreter, add local-lib to PATH and PERL5LIB environment variables,
|
||||
# so the locally installed modules (mainly the Alien::wxPerl) will be reached.
|
||||
if (WIN32)
|
||||
set(ENV_PATH_SEPARATOR ";")
|
||||
else()
|
||||
set(ENV_PATH_SEPARATOR ":")
|
||||
endif()
|
||||
set(ENV{PATH} "${PROJECT_SOURCE_DIR}/local-lib/bin${ENV_PATH_SEPARATOR}$ENV{PATH}")
|
||||
set(PERL_INCLUDE "${PROJECT_SOURCE_DIR}/local-lib/lib/perl5${ENV_PATH_SEPARATOR}$ENV{PERL5LIB}")
|
||||
message("PATH: $ENV{PATH}")
|
||||
message("PERL_INCLUDE: ${PERL_INCLUDE}")
|
||||
find_package(Perl REQUIRED)
|
||||
if (WIN32)
|
||||
# On Windows passing the PERL5LIB variable causes various problems (such as with MAX_PATH and others),
|
||||
# basically I've found no good way to do it on Windows.
|
||||
set(PERL5LIB_ENV_CMD "")
|
||||
else()
|
||||
set(PERL5LIB_ENV_CMD ${CMAKE_COMMAND} -E env PERL5LIB=${PERL_INCLUDE})
|
||||
endif()
|
||||
|
||||
# Perl specific stuff
|
||||
find_package(PerlLibs REQUIRED)
|
||||
set(PerlEmbed_DEBUG 1)
|
||||
find_package(PerlEmbed REQUIRED)
|
||||
|
||||
# Generate the Slic3r Perl module (XS) typemap file.
|
||||
set(MyTypemap ${CMAKE_CURRENT_BINARY_DIR}/typemap)
|
||||
add_custom_command(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue