aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/CMakeLists.txt6
-rw-r--r--src/modules/perlcore/CMakeLists.txt18
-rw-r--r--src/modules/perlcore/libkviperlcore.cpp8
3 files changed, 14 insertions, 18 deletions
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index fd16ac82b..1acf77274 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -31,7 +31,7 @@ SUBDIRS(
mask math mediaplayer mircimport my
notifier
objects options
- popupeditor proxydb
+ perl perlcore popupeditor proxydb
raweditor regchan reguser
serverdb setup sharedfile sharedfileswindow snd socketspy spaste str system
texticons term theme tip tmphighlight toolbar toolbareditor torrent trayicon
@@ -39,10 +39,6 @@ SUBDIRS(
url
window
-
- # modules to deprecate ?
- # perl, perlcore
-
# forgotten ?
# offer
)
diff --git a/src/modules/perlcore/CMakeLists.txt b/src/modules/perlcore/CMakeLists.txt
index 82e1de70a..928949256 100644
--- a/src/modules/perlcore/CMakeLists.txt
+++ b/src/modules/perlcore/CMakeLists.txt
@@ -1,14 +1,5 @@
# CMakeLists for src/modules/perlcore
-IF(UNIX)
- IF(APPLE)
- LIST(APPEND LIBS -lperl)
- ENDIF()
-ELSE()
- # Assume windows
- LIST(APPEND LIBS -lperl58)
-ENDIF()
-
SET(kviperlcore_SRCS
libkviperlcore.cpp
)
@@ -17,4 +8,13 @@ SET(kviperlcore_SRCS
QT4_WRAP_CPP(kviperlcore_MOC_SRCS ${kviperlcore_MOC_HDRS})
SET(kvi_module_name kviperlcore)
+
+EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts
+ OUTPUT_VARIABLE PERL_COMPILE_FLAGS
+)
+
+STRING(REGEX REPLACE "(\r?\n)+$" "" PERL_COMPILE_FLAGS "${PERL_COMPILE_FLAGS}")
+
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt)
+
+SET_TARGET_PROPERTIES(${kvi_module_name} PROPERTIES COMPILE_FLAGS ${PERL_COMPILE_FLAGS})
diff --git a/src/modules/perlcore/libkviperlcore.cpp b/src/modules/perlcore/libkviperlcore.cpp
index 584e8a2d9..0c66ff6f9 100644
--- a/src/modules/perlcore/libkviperlcore.cpp
+++ b/src/modules/perlcore/libkviperlcore.cpp
@@ -65,7 +65,7 @@
#include <XSUB.h>
#include "ppport.h"
-
+
#include "kvi_kvs_runtimecontext.h"
static KviKvsRunTimeContext * g_pCurrentKvsContext = 0;
@@ -223,12 +223,12 @@ bool KviPerlInterpreter::execute(
szError = __tr2qs_ctx("Internal error: perl interpreter not initialized","perl");
return false;
}
-
+
g_lWarningList.clear();
KviQCString szUtf8 = szCode.toUtf8();
PERL_SET_CONTEXT(m_pInterpreter);
-
+
// clear the _ array
AV * pArgs = get_av("_",1);
SV * pArg = av_shift(pArgs);
@@ -322,7 +322,7 @@ static void perlcore_destroy_interpreter(const QString &szContextName)
static void perlcore_destroy_all_interpreters()
{
KviPointerHashTableIterator<QString,KviPerlInterpreter> it(*g_pInterpreters);
-
+
while(it.current())
{
KviPerlInterpreter * i = it.current();