2013-06-16 08:17:46 -05:00
|
|
|
# Configure QT modules for the appropriate version of QT
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
|
|
|
message(Building for QT5+...)
|
|
|
|
QT += webkitwidgets network widgets
|
2016-06-08 04:54:28 -05:00
|
|
|
win32 {
|
|
|
|
RC_ICONS += pgAdmin4.ico
|
|
|
|
}
|
2013-06-16 08:17:46 -05:00
|
|
|
} else {
|
|
|
|
message(Building for QT4...)
|
2016-06-08 04:54:28 -05:00
|
|
|
QT += webkit network
|
|
|
|
win32 {
|
|
|
|
RC_FILE += pgAdmin4.rc
|
|
|
|
}
|
2013-06-16 08:17:46 -05:00
|
|
|
}
|
|
|
|
|
2016-05-19 08:33:00 -05:00
|
|
|
CONFIG(debug, debug|release) {
|
|
|
|
DEFINES += PGADMIN4_DEBUG
|
|
|
|
message(Configure pgAdmin4 to run in debug mode...)
|
|
|
|
}
|
|
|
|
|
2016-02-02 07:16:01 -06:00
|
|
|
win32 {
|
|
|
|
message(Building for Windows...)
|
|
|
|
|
|
|
|
# Read the PYTHON_HOME and PYTHON_VERSION system environment variables.
|
|
|
|
PY_HOME = $$(PYTHON_HOME)
|
|
|
|
PY_VERSION = $$(PYTHON_VERSION)
|
|
|
|
|
|
|
|
isEmpty(PY_HOME) {
|
|
|
|
error(Please define the PYTHON_HOME variable in the system environment.)
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
isEmpty(PY_VERSION) {
|
|
|
|
error(Please define the PYTHON_VERSION variable in the system environment.)
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
INCLUDEPATH = $$PY_HOME\include
|
|
|
|
LIBS += -L"$$PY_HOME\libs" -lpython$$PY_VERSION
|
|
|
|
|
|
|
|
# Set the PYTHON2 macro if appropriate
|
|
|
|
PY2_VERSION = $$find(PY_VERSION, "^2")
|
|
|
|
count( PY2_VERSION, 1) {
|
|
|
|
message(Python version 2.x detected.)
|
|
|
|
DEFINES += PYTHON2
|
|
|
|
}
|
|
|
|
}
|
2016-01-18 08:33:28 -06:00
|
|
|
}
|
2013-06-16 08:17:46 -05:00
|
|
|
}
|
2016-02-02 07:16:01 -06:00
|
|
|
else {
|
|
|
|
message(Building for Linux/Mac...)
|
2016-01-18 08:33:28 -06:00
|
|
|
|
2016-02-02 07:16:01 -06:00
|
|
|
PYTHON_CONFIG=python3-config
|
|
|
|
|
|
|
|
# Find and configure Python
|
|
|
|
!system(which python3-config > /dev/null 2>&1) {
|
|
|
|
!system(which python-config > /dev/null 2>&1) {
|
|
|
|
error(The python-config executable could not be found. Ensure Python is installed and in the system path.)
|
|
|
|
} else {
|
|
|
|
PYTHON_CONFIG=python-config
|
|
|
|
DEFINES += PYTHON2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QMAKE_CXXFLAGS += $$system($$PYTHON_CONFIG --includes)
|
|
|
|
QMAKE_LFLAGS += $$system($$PYTHON_CONFIG --ldflags)
|
2016-06-02 02:42:45 -05:00
|
|
|
LIBS += $$system($$PYTHON_CONFIG --libs)
|
2016-02-02 07:16:01 -06:00
|
|
|
}
|
2013-06-16 08:17:46 -05:00
|
|
|
|
|
|
|
# Source code
|
2013-06-21 17:21:11 -05:00
|
|
|
HEADERS = BrowserWindow.h \
|
2013-10-04 09:09:53 -05:00
|
|
|
Server.h \
|
2016-01-18 08:33:28 -06:00
|
|
|
pgAdmin4.h \
|
|
|
|
TabWindow.h \
|
2016-01-19 04:26:01 -06:00
|
|
|
WebViewWindow.h \
|
|
|
|
ConfigWindow.h
|
2013-06-16 08:17:46 -05:00
|
|
|
SOURCES = pgAdmin4.cpp \
|
2013-06-21 17:21:11 -05:00
|
|
|
BrowserWindow.cpp \
|
2016-01-18 08:33:28 -06:00
|
|
|
Server.cpp \
|
|
|
|
TabWindow.cpp \
|
2016-01-19 04:26:01 -06:00
|
|
|
WebViewWindow.cpp \
|
|
|
|
ConfigWindow.cpp
|
|
|
|
FORMS = BrowserWindow.ui \
|
|
|
|
ConfigWindow.ui
|
2013-06-16 08:17:46 -05:00
|
|
|
ICON = pgAdmin4.icns
|
|
|
|
QMAKE_INFO_PLIST = Info.plist
|
|
|
|
|
2016-01-25 11:21:00 -06:00
|
|
|
RESOURCES += \
|
|
|
|
pgadmin4.qrc
|
|
|
|
|