summaryrefslogtreecommitdiff
path: root/cmake/FindPython.cmake
AgeCommit message (Collapse)Author
2022-01-17core: update copyright datesSébastien Helleu
2021-01-02core: update copyright datesSébastien Helleu
2020-01-04core: update copyright datesSébastien Helleu
2019-11-12build: support python 3.8Eli Schwartz
In python 3.8, in order to link to -lpython3.8, you need to use the exported pkg-config interface 'python3-embed' (or 'python3-config --libs --embed'), see https://bugs.python.org/issue36721 for details.
2019-11-12python: use more idiomatic cmake pkg-config linkingEli Schwartz
cmake documentation is absolutely atrocious, and I don't know why they mention all the wrong things to use, and the cargo cult of successfully writing a cmake build definition (copy-pasting what works from other projects) also uses all the wrong things. But it turns out it is possible to correctly link a PkgConfig target despite all that, at least, *iff* you use cmake >= 3.13. I've chosen option 2, which is to vendor in cmake >= 3.13's FindPkgConfig module in the previous commit. Using IMPORTED_TARGET GLOBAL in a pkg-config check will result in a proper linker target being created. For comparison, this is like using meson's dependency() target, except meson forces you to do this by default. The result is that the build system's internal representation of how to link something, is used instead of manually passing build flags defined in variables. This is an important distinction to make, because cmake does not have a list datatype, and instead turns lists into strings separated by ';' which are indistinguishable from, like, strings which contain ';' characters. When you pass the resulting list-which-isn't-really-a-list to link an executable/library, you either need to preprocess the variable to replace ';' with ' ' (just in case there are multiple elements) or use cmake functions which magically know to do this themselves -- or at least, I assume there are cmake functions that correctly handle so-called "lists", or there would be no need for "lists" to exist. The IMPORTED_TARGET will define a bunch of INTERFACE_* properties which do seem to do exactly this. The resulting build definition should actually, correctly, link python, thereby fixing #1398 in a better way.
2019-10-01core: fix style in CMake filesSébastien Helleu
2019-07-31build: use pkg-config to properly link pythonEli Schwartz
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.
2019-07-01core: compile with Python 3 by defaultSébastien Helleu
The CMake option ENABLE_PYTHON3 is renamed to ENABLE_PYTHON2, to use Python 2 first then fallback on Python 3. In the same way, the configure option --enable-python3 is renamed to --enable-python2, to use Python 2 first then fallback on Python 3.
2019-01-01core: update copyright datesSébastien Helleu
2018-11-29core: use https for links to GNU GPL licenseSébastien Helleu
2018-07-12python: add detection of Python 3.7Sébastien Helleu
2018-01-05core: update copyright datesSébastien Helleu
2017-05-08python: add detection of Python 3.6Sébastien Helleu
2017-01-01core: update copyright datesSébastien Helleu
2016-06-21python: add detection of Python 3.5Sébastien Helleu
2016-02-01Python plugin shared libraries missingShane McCarron
When linking against a python with shared libraries, this script ONLY asked for the LD flags, not any additional libraries. This could result in a condition where required libraries (such as libutil on Centos 6.7 against Python 2.7) are not loaded and the load of the plugin thus fails. This change asks the python being linked against which libraries it was linked using, and then ensures those are also linked against by the python plugin for weechat.
2016-01-01core: update copyright datesSébastien Helleu
2015-01-01core: update copyright datesSébastien Helleu
2014-09-28core: use HINTS for introspected values in Python detectionTim D. Smith
2014-04-12core: use lower case for CMake keywordsSébastien Helleu
2014-01-01core: update copyright datesSebastien Helleu
2013-01-31core: fix detection of python on Ubuntu RaringSebastien Helleu
2013-01-05core: add cmake option ENABLE_PYTHON3 and configure option --enable-python3Sebastien Helleu
With this option, the python plugin will be built and linked with Python 3 (if found, or Python 2 as fallback). This option it not (yet) recommended, because many scripts are working only with Python 2.x. It should be used only to tests scripts with Python 3.x in WeeChat.
2013-01-01core: update copyright datesSebastien Helleu
2012-08-21core: check that python version is >= 2.5 in cmake/autotools (patch from ↵Sebastien Helleu
Peter Boström)
2012-07-17python: fix detection of python (first try "python2.x" and then "python") ↵Sebastien Helleu
(bug #36835)
2012-01-08core: update copyright datesSebastien Helleu
2012-01-03python: support of Python 3.x (task #11704)Sebastien Helleu
Note that Python 2.x is still the only Python compiled if found: Python 3.x is not auto-detected by cmake neither configure. Many official Python scripts will not load/run with Python 3.x, so Python 2.x (2.7 or 2.6) is still the recommended version.
2011-10-26core: remove unneeded whitespaceSebastien Helleu
2011-01-01Update copyright datesSebastien Helleu
2010-12-13Add support of python 2.7 in cmake and configure (debian #606989)Sebastien Helleu
2010-06-22Update licenses and copyrights, add missing author names in sourcesSebastien Helleu
2010-03-19Reformat multi-line commentsSebastien Helleu
2010-01-03Update copyright datesSebastien Helleu
2009-02-02Add check for python 2.6Julien Louis
2009-01-03Update copyright datesSebastien Helleu
2008-01-02Update of year in some copyrightsSebastien Helleu
2007-07-02Replaced GPL 2 license by GPL 3Sebastien Helleu
2007-05-21Added cmake for weechat compileSebastien Helleu