summaryrefslogtreecommitdiff
path: root/src/plugins/python/CMakeLists.txt
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-08-31 14:13:58 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-08-31 14:13:58 +0200
commit8bb45494945f10c73855a58581a5e61be8ef1f7b (patch)
tree90b981db77814ebabfef3f881464b7b9fb0fcb2b /src/plugins/python/CMakeLists.txt
parent63902ef52d471bee1d4946f98db6d8e93d105805 (diff)
downloadweechat-8bb45494945f10c73855a58581a5e61be8ef1f7b.zip
core: fix compilation of Python plugin on FreeBSD 12.0 (closes #1398)
Diffstat (limited to 'src/plugins/python/CMakeLists.txt')
-rw-r--r--src/plugins/python/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/python/CMakeLists.txt b/src/plugins/python/CMakeLists.txt
index 076e4c702..2229e551a 100644
--- a/src/plugins/python/CMakeLists.txt
+++ b/src/plugins/python/CMakeLists.txt
@@ -23,6 +23,11 @@ weechat-python-api.c weechat-python-api.h)
set_target_properties(python PROPERTIES PREFIX "")
if(PYTHON_FOUND)
+ # There's a weird bug on FreeBSD: the value of PYTHON_LDFLAGS is
+ # "-L/usr/local/lib;-lpython3.6m" instead of "-L/usr/local/lib -lpython3.6m".
+ # This is a temporary hack to fix the value, waiting for a clean fix.
+ string(REPLACE ";" " " PYTHON_LDFLAGS "${PYTHON_LDFLAGS}")
+
include_directories(${PYTHON_INCLUDE_DIRS})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PYTHON_LDFLAGS}")
target_link_libraries(python ${PYTHON_LIBRARIES} weechat_plugins_scripts coverage_config)