-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscripts_config.prf
53 lines (45 loc) · 2.05 KB
/
scripts_config.prf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This file contains all the neceesary defines and linkages for scripts and Python usage.
# It should be included in each .pro file that has scripting code modules.
# The two environment variables, PYTHON_VERSION and PYTHONQT_PREFIX need to defined
# in the environment. (in Unix in .bashrc or .profile)
# Set ENABLE_PYTHON_SCRIPTING = "N" to disable a references to python and eliminate script modules!
ENABLE_PYTHON_SCRIPTING = "Y"
exists(local_config.prf) {
include (local_config.prf)
}
equals( ENABLE_PYTHON_SCRIPTING, "Y") {
PROJ_DIR=$$(PROJ_DIR) # get project directory from env
isEmpty( PROJ_DIR ) {
win32:PROJ_DIR=C:/Projects
unix:PROJ_DIR=/home/allen/Projects
}
# NOTE: The PYTHONQT_PREFIX path should be exported in the environment like thi:
# On Unix, "export PYTHON_VERSION=2.7"
# and "export PYTHONQT_PREFIX=/home/allen/Projects/PythonQt/pythonqt-code"
#
PYTHONQT_PREFIX=$$(PYTHONQT_PREFIX)
isEmpty( PYTHONQT_PREFIX ) {
win32:PYTHONQT_PREFIX=C:/Program Files (x86)/local/lib
unix:PYTHONQT_PREFIX=$${PROJ_DIR}/pythonqt-master
}
include($$PYTHONQT_PREFIX/build/python.prf)
win32:exists($$PYTHONQT_PREFIX/lib/PythonQt_d.dll){
ENABLE_SCRIPTING = "Y"
}
unix:exists($$PYTHONQT_PREFIX/lib/libPythonQt-Qt5-Python$${PYTHON_VERSION}.so) {
ENABLE_SCRIPTING = "Y"
}
unix:exists($$PYTHONQT_PREFIX/lib/libPythonQt-Qt5-Python$${PYTHON_VERSION}.so){
ENABLE_SCRIPTING = "Y"
message($$TARGET: $$PYTHONQT_PREFIX/lib/libPythonQt-Qt5-Python$${PYTHON_VERSION}.so + "found OK")
} else:unix: {
message($$TARGET: $$PYTHONQT_PREFIX/lib/libPythonQt-Qt5-Python$${PYTHON_VERSION}.so + "not found")
}
win32:CONFIG(debug, debug|release): LIBS += -L$$PYTHONQT_PREFIX/lib -lPythonQt
else:unix: LIBS += -L/$$PYTHONQT_PREFIX/lib/ -lPythonQt-Qt5-Python$${PYTHON_VERSION} -lPythonQt_QtAll-Qt5-Python$${PYTHON_VERSION}
INCLUDEPATH += $$PYTHONQT_PREFIX/src $$PYTHONQT_PREFIX/extensions/PythonQt_QtAll
DEPENDPATH += $$PYTHONQT_PREFIX/src $$PYTHONQT_PREFIX/extensions/PythonQt_QtAll
#ENABLE_SCRIPTING = "N"
} else {
message ($$TARGET: global ENABLE_PYTHON_SCRIPTING not enabled ($$ENABLE_PYTHON_SCRIPTING))
}