diff options
author | bubnikv <bubnikv@gmail.com> | 2017-08-18 22:09:53 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-08-18 22:09:53 +0300 |
commit | ba1c0b0137f84e95a937a5920a7d0184e01ff0b6 (patch) | |
tree | 6ef0fee2b075704d20d3b9fbb95d0677f0b52c32 /cmake | |
parent | e2a685b8bb96cee4ced5a33e2fe7cd054d0ba2ee (diff) |
CMake build process - fixes of the previous check-ins to build
cleanly on Windows & Linux. There is still a work on OSX:
The XS module has to be linked without perl.lib and with
the following parameters to produce a bundle: -bundle -undefined dynamic_lookup
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindPerlEmbed.cmake | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cmake/modules/FindPerlEmbed.cmake b/cmake/modules/FindPerlEmbed.cmake index fc209bc91..ae927dac4 100644 --- a/cmake/modules/FindPerlEmbed.cmake +++ b/cmake/modules/FindPerlEmbed.cmake @@ -14,6 +14,7 @@ execute_process( # Import Perl modules. use strict; use warnings; +use Config; use Text::ParseWords; use ExtUtils::CppGuess; @@ -45,9 +46,13 @@ sub cmake_set_var { my @words = shellwords(\$content); print \$fh \"set(PerlEmbed_\$varname \\\"\" . join(';', @words) . \"\\\")\\n\"; } -cmake_set_var('CCFLAGS', \$ccflags); +cmake_set_var('CCFLAGS', \$ccflags); \$ldflags =~ s/ -L/ -LIBPATH:/g if \$msvc; -cmake_set_var('LDFLAGS', \$ldflags); +cmake_set_var('LD', \$Config{ld}); +cmake_set_var('LDFLAGS', \$ldflags); +cmake_set_var('CCCDLFLAGS', \$Config{cccdlflags}); +cmake_set_var('LDDLFLAGS', \$Config{lddlflags}); +cmake_set_var('DLEXT', \$Config{dlext}); close \$fh; ") include(${PerlEmbed_TEMP_INCLUDE}) @@ -68,7 +73,9 @@ if (PerlEmbed_DEBUG) message(STATUS " PERL_EXTRA_C_FLAGS = ${PERL_EXTRA_C_FLAGS}") # Second show the configuration extracted by this module (FindPerlEmbed): message(STATUS " PerlEmbed_CCFLAGS = ${PerlEmbed_CCFLAGS}") + message(STATUS " LD = ${PerlEmbed_LD}") message(STATUS " PerlEmbed_LDFLAGS = ${PerlEmbed_LDFLAGS}") + message(STATUS " PerlEmbed_LDDLFLAGS = ${PerlEmbed_LDDLFLAGS}") endif() include(FindPackageHandleStandardArgs) |