1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-23 03:16:37 +02:00

build: use pkg-config to properly link python

fixes incorrect (non)detection of libpython3.Ym.so due to PEP 3149 since
python's officially exported build flags know how to correctly link to
python.
This commit is contained in:
Eli Schwartz
2019-07-24 14:50:36 -04:00
committed by Sébastien Helleu
parent b8d69307ee
commit ad7d16a5b3
4 changed files with 21 additions and 84 deletions
+3 -3
View File
@@ -23,9 +23,9 @@ weechat-python-api.c weechat-python-api.h)
set_target_properties(python PROPERTIES PREFIX "")
if(PYTHON_FOUND)
include_directories(${PYTHON_INCLUDE_PATH})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PYTHON_LFLAGS}")
target_link_libraries(python ${PYTHON_LIBRARY} weechat_plugins_scripts coverage_config)
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)
endif()
install(TARGETS python LIBRARY DESTINATION ${WEECHAT_LIBDIR}/plugins)
+1 -1
View File
@@ -28,6 +28,6 @@ python_la_SOURCES = weechat-python.c \
weechat-python-api.c \
weechat-python-api.h
python_la_LDFLAGS = -module -no-undefined
python_la_LIBADD = ../lib_weechat_plugins_scripts.la $(PYTHON_LFLAGS)
python_la_LIBADD = ../lib_weechat_plugins_scripts.la $(PYTHON_LIBS)
EXTRA_DIST = CMakeLists.txt