From 00ba2e8c4d07f9b580723df7c5823f0e413dc5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 1 Jan 2015 13:23:57 +0100 Subject: [PATCH] core: fix compilation of plugins with cmake >= 3.1 (closes #287) The flag -fPIC is now forced for compilation of plugins. It should fix compilation problems when cmake doesn't add this flag. --- ChangeLog.asciidoc | 1 + src/plugins/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index 30b80da93..bbcc9714a 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -59,6 +59,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] === Bugs fixed +* core: fix compilation of plugins with cmake >= 3.1 (closes #287) * core: fix display bug when scrolling in buffer on a filtered line (closes #240) * core: send mouse code only one time to terminal with command diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 95c457b05..58193e327 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -32,7 +32,7 @@ plugin-script-callback.c plugin-script-callback.h) include_directories(${CMAKE_BINARY_DIR}) add_library(weechat_plugins STATIC ${LIB_PLUGINS_SRC}) -add_definitions(${CMAKE_SHARED_LIBRARY_C_FLAGS}) +add_definitions(${CMAKE_SHARED_LIBRARY_C_FLAGS} -fPIC) add_library(weechat_plugins_scripts STATIC ${LIB_PLUGINS_SCRIPTS_SRC}) include(CheckIncludeFiles)