Skip to content

Commit

Permalink
update pri files
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Oct 24, 2021
1 parent 9a4aef4 commit e5f051e
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 50 deletions.
60 changes: 39 additions & 21 deletions global.pri
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@ run-without-python {
CONFIG += python
QMAKE_CFLAGS += -include Python.h
QMAKE_CXXFLAGS += -include Python.h
python3 {
PYV=3
PY_PKG_SUFFIX=-embed
PYTHON_CONFIG_FLAGS=--embed
} else {
PYV=2
PY_PKG_SUFFIX=
PYTHON_CONFIG_FLAGS=
}
# PYVER contains just major.minor
PYVER=$$system(python$$PYV -c \"import platform; print(\'.\'.join(platform.python_version_tuple()[:2]))\")
PYVERNODOT=$$replace($$PYVER,.,)
# PYTHON_VERSION contains major.minor.micro
PYTHON_VERSION=$$system(python$$PYV -c \"import platform; print(platform.python_version())\")
# PYTHON_SITE_PACKAGES contains the location of the site-packages directory
PYTHON_SITE_PACKAGES=$$system(python$$PYV -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")
# User may specify an alternate python2-config from the command-line,
# as in "qmake PYTHON_CONFIG=python2.7-config"
isEmpty(PYTHON_CONFIG) {
PYTHON_CONFIG = python$$PYV-config
}
}

*g++* | *clang* | *xcode* {
Expand Down Expand Up @@ -378,17 +399,17 @@ win32-g++ {
expat: PKGCONFIG += expat
cairo: PKGCONFIG += cairo fontconfig
equals(QT_MAJOR_VERSION, 5) {
shiboken: INCLUDEPATH += $$system(python2 -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")/PySide2/include/shiboken
pyside: INCLUDEPATH += $$system(python2 -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")/PySide2/include/PySide2
pyside: INCLUDEPATH += $$system(python2 -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")/PySide2/include/PySide2/QtCore
shiboken: INCLUDEPATH += $$PYTHON_SITE_PACKAGES/PySide2/include/shiboken
pyside: INCLUDEPATH += $$PYTHON_SITE_PACKAGES/PySide2/include/PySide2
pyside: INCLUDEPATH += $$PYTHON_SITE_PACKAGES/PySide2/include/PySide2/QtCore
}
equals(QT_MAJOR_VERSION, 4) {
shiboken: PKGCONFIG += shiboken-py2
pyside: PKGCONFIG += pyside-py2
pyside: INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)/QtCore
pyside: INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)/QtGui
shiboken: PKGCONFIG += shiboken-py$$PYV
pyside: PKGCONFIG += pyside-py$$PYV
pyside: INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtCore
pyside: INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtGui
}
python: PKGCONFIG += python-2.7
python: PKGCONFIG += python-$$PYVER$$PY_PKG_SUFFIX
boost: LIBS += -lboost_serialization-mt
boost: LIBS += -lboost_serialization-mt

Expand Down Expand Up @@ -416,24 +437,19 @@ unix {
LIBS += -ldl
}

# User may specify an alternate python2-config from the command-line,
# as in "qmake PYTHON_CONFIG=python2.7-config"
isEmpty(PYTHON_CONFIG) {
PYTHON_CONFIG = python2-config
}
python {
#PKGCONFIG += python
LIBS += -L$$system($$PYTHON_CONFIG --exec-prefix)/lib $$system($$PYTHON_CONFIG --ldflags)
PYTHON_CFLAGS = $$system($$PYTHON_CONFIG --includes)
LIBS += -L$$system($$PYTHON_CONFIG $$PYTHON_CONFIG_FLAGS --exec-prefix)/lib $$system($$PYTHON_CONFIG $$PYTHON_CONFIG_FLAGS --ldflags)
PYTHON_CFLAGS = $$system($$PYTHON_CONFIG $$PYTHON_CONFIG_FLAGS --includes)
PYTHON_INCLUDEPATH = $$find(PYTHON_CFLAGS, ^-I.*)
PYTHON_INCLUDEPATH ~= s/^-I(.*)/\\1/g
INCLUDEPATH *= $$PYTHON_INCLUDEPATH
}

equals(QT_MAJOR_VERSION, 5) {
shiboken: INCLUDEPATH += $$system(python2 -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")/PySide2/include/shiboken
pyside: INCLUDEPATH += $$system(python2 -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")/PySide2/include/PySide2
pyside: INCLUDEPATH += $$system(python2 -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")/PySide2/include/PySide2/QtCore
shiboken: INCLUDEPATH += $$PYTHON_SITE_PACKAGES/PySide2/include/shiboken
pyside: INCLUDEPATH += $$PYTHON_SITE_PACKAGES/PySide2/include/PySide2
pyside: INCLUDEPATH += $$PYTHON_SITE_PACKAGES/PySide2/include/PySide2/QtCore
}

equals(QT_MAJOR_VERSION, 4) {
Expand All @@ -448,14 +464,14 @@ unix {
QMAKE_LFLAGS += '-Wl,-rpath,\'@loader_path/../Frameworks\''
shiboken {
PKGCONFIG -= shiboken
PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG --exec-prefix)/lib/pkgconfig:$$(PKG_CONFIG_PATH)
PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG $$PYTHON_CONFIG_FLAGS --exec-prefix)/lib/pkgconfig:$$(PKG_CONFIG_PATH)
INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir shiboken)
# the sed stuff is to work around an Xcode generator bug
LIBS += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --libs shiboken | sed -e s/-undefined\\ dynamic_lookup//)
}
pyside {
PKGCONFIG -= pyside
PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG --exec-prefix)/lib/pkgconfig:$$(PKG_CONFIG_PATH)
PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG $$PYTHON_CONFIG_FLAGS --exec-prefix)/lib/pkgconfig:$$(PKG_CONFIG_PATH)
INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)
INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtCore
equals(QT_MAJOR_VERSION, 4) {
Expand Down Expand Up @@ -601,4 +617,6 @@ FC_CACHEDIR += "<cachedir>LOCAL_APPDATA_FONTCONFIG_CACHE</cachedir>"


# and finally...
include(config.pri)
!include(config.pri) {
error("System-specific config.pri file not present, please follow the installation instructions and create it.")
}
5 changes: 2 additions & 3 deletions tools/jenkins/include/natron/CY2016.pri
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ LIBS += -lpyside2-python$$PYVER
shiboken {
PKGCONFIG -= shiboken
PKGCONFIG -= shiboken-py$$PYV
PKGCONFIG += shiboken2
INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken2)
LIBS += -lshiboken2-python$$PYVER
INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken-py$$PYV)
LIBS += $$system(pkg-config --libs shiboken-py$$PYV)
}

QMAKE_LFLAGS += -Wl,-rpath,\\\$\$ORIGIN/../lib
Expand Down
12 changes: 6 additions & 6 deletions tools/jenkins/include/natron/Linux_natron3.pri
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ LIBS+="-L/opt/Natron-sdk/lib"
pyside {
PKGCONFIG -= pyside
PKGCONFIG -= pyside-py$$PYV
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside)
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside)/QtCore
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside)/QtGui
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtCore
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtGui
INCLUDEPATH += $$system(pkg-config --variable=includedir QtGui)
LIBS += -lpyside-python$$PYVER
LIBS += $$system(pkg-config --libs pyside-py$$PYV)
}
shiboken {
PKGCONFIG -= shiboken
PKGCONFIG -= shiboken-py$$PYV
INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken)
LIBS += -lshiboken-python$$PYVER
INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken-py$$PYV)
LIBS += $$system(pkg-config --libs shiboken-py$$PYV)
}

QMAKE_LFLAGS += -Wl,-rpath,\\\$\$ORIGIN/../lib
Expand Down
17 changes: 7 additions & 10 deletions tools/jenkins/include/natron/OSX.pri
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
boost {
BOOST_VERSION = $$system("ls /opt/local/libexec/boost|sort|tail -1")
message("found boost $$BOOST_VERSION")
INCLUDEPATH += /opt/local/libexec/boost/$$BOOST_VERSION/include
LIBS += -L/opt/local/libexec/boost/$$BOOST_VERSION/lib -lboost_serialization-mt
LIBS += -lboost_serialization-mt
}
shiboken {
PKGCONFIG -= shiboken
INCLUDEPATH += /opt/local/include/shiboken-$$PYVER
python3 {
LIBS += -L/opt/local/lib -lshiboken-cpython-$$PYVERNODOT-darwin
} else {
LIBS += -L/opt/local/lib -lshiboken-python$$PYVER
}
PKGCONFIG -= pyside-py$$PYV
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtCore
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtGui
INCLUDEPATH += $$system(pkg-config --variable=includedir QtGui)
LIBS += $$system(pkg-config --libs pyside-py$$PYV)
}
python {
# required to link natron-python, which needs libintl
Expand Down
23 changes: 13 additions & 10 deletions tools/jenkins/include/natron/OSX_natron3.pri
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
boost {
BOOST_VERSION = $$system("ls /opt/local/libexec/boost|sort|tail -1")
message("found boost $$BOOST_VERSION")
INCLUDEPATH += /opt/local/libexec/boost/$$BOOST_VERSION/include
LIBS += -L/opt/local/libexec/boost/$$BOOST_VERSION/lib -lboost_serialization-mt
LIBS += -lboost_serialization-mt
}
boost-serialization-lib: LIBS += -lboost_serialization-mt
pyside {
PKGCONFIG -= pyside
PKGCONFIG -= pyside-py$$PYV
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtCore
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py$$PYV)/QtGui
INCLUDEPATH += $$system(pkg-config --variable=includedir QtGui)
LIBS += $$system(pkg-config --libs pyside-py$$PYV)
}
shiboken {
PKGCONFIG -= shiboken
INCLUDEPATH += /opt/local/include/shiboken-$$PYVER
python3 {
LIBS += -L/opt/local/lib -lshiboken-cpython-$$PYVERNODOT-darwin
} else {
LIBS += -L/opt/local/lib -lshiboken-python$$PYVER
}
PKGCONFIG -= shiboken-py$$PYV
INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken-py$$PYV)
LIBS += $$system(pkg-config --libs shiboken-py$$PYV)
}
python {
# required to link natron-python, which needs libintl
Expand Down

0 comments on commit e5f051e

Please sign in to comment.