mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Another attempt at fixing the 'do we need the --embed flag for Python' problem.
This change looks at the output from python-config --help (which may go to stderr or stdout), and if it includes --embed, adds it to the later call to get the libs string.
This commit is contained in:
parent
97be3d8179
commit
e8a4b46ba1
@ -73,15 +73,11 @@ else {
|
||||
|
||||
message(Using $$PYTHON_CONFIG)
|
||||
|
||||
PYTHON_VERSION = $$system($$PYTHON_CONFIG --libs | grep -o -i "[0-9]\.[0-9]" | sed "s/\.//g")
|
||||
PYTHON_EMBED = $$system($$PYTHON_CONFIG --help 2>&1 | grep -o \'\\-\\-embed\')
|
||||
|
||||
QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes)
|
||||
QMAKE_LFLAGS += $$system($$PYTHON_CONFIG --ldflags)
|
||||
greaterThan(PYTHON_VERSION, 37) {
|
||||
LIBS += $$system($$PYTHON_CONFIG --libs --embed)
|
||||
} else {
|
||||
LIBS += $$system($$PYTHON_CONFIG --libs)
|
||||
}
|
||||
LIBS += $$system($$PYTHON_CONFIG --libs $$PYTHON_EMBED)
|
||||
|
||||
contains( LIBS, -lpython2.* ) {
|
||||
DEFINES += PYTHON2
|
||||
|
Loading…
Reference in New Issue
Block a user