klayout/src/klayout.pri

206 lines
4.1 KiB
Plaintext
Raw Normal View History

TL_INC = $$PWD/tl/tl
DB_INC = $$PWD/db/db
2017-08-23 09:58:39 +02:00
DRC_INC = $$PWD/drc/drc
2019-07-06 09:15:33 +02:00
LVS_INC = $$PWD/lvs/lvs
EDT_INC = $$PWD/edt/edt
EXT_INC = $$PWD/ext/ext
GSI_INC = $$PWD/gsi/gsi
ANT_INC = $$PWD/ant/ant
RDB_INC = $$PWD/rdb/rdb
IMG_INC = $$PWD/img/img
LYM_INC = $$PWD/lym/lym
LIB_INC = $$PWD/lib/lib
LAY_INC = $$PWD/lay/lay
LAYBASIC_INC = $$PWD/laybasic/laybasic
QTBASIC_INC = $$PWD/gsiqt/qtbasic
BD_INC = $$PWD/buddies/src/bd
2017-08-23 09:58:39 +02:00
VERSION_INC = $$PWD/version
equals(HAVE_RUBY, "1") {
RBA_INC = $$PWD/rba/rba
2019-09-18 00:50:21 +02:00
RBA_LIB = klayout_rba
2017-08-23 09:58:39 +02:00
} else {
RBA_INC = $$PWD/rbastub
2019-09-18 00:50:21 +02:00
RBA_LIB = klayout_rbastub
2017-08-23 09:58:39 +02:00
}
equals(HAVE_PYTHON, "1") {
PYA_INC = $$PWD/pya/pya
2019-09-18 00:50:21 +02:00
PYA_LIB = klayout_pya
2017-08-23 09:58:39 +02:00
} else {
PYA_INC = $$PWD/pyastub
2019-09-18 00:50:21 +02:00
PYA_LIB = klayout_pyastub
2017-08-23 09:58:39 +02:00
}
equals(HAVE_QTBINDINGS, "1") {
2017-08-23 09:58:39 +02:00
DEFINES += HAVE_QTBINDINGS
}
equals(HAVE_64BIT_COORD, "1") {
2017-08-23 09:58:39 +02:00
DEFINES += HAVE_64BIT_COORD
}
equals(HAVE_PYTHON, "1") {
!isEmpty(BITS_PATH) {
include($$BITS_PATH/python/python.pri)
}
2017-08-23 09:58:39 +02:00
DEFINES += HAVE_PYTHON
}
equals(HAVE_CURL, "1") {
!isEmpty(BITS_PATH) {
include($$BITS_PATH/curl/curl.pri)
} else {
LIBS += -lcurl
win32 {
LIBS += -lwsock32 # required because we do "select"
}
}
DEFINES += HAVE_CURL
}
equals(HAVE_EXPAT, "1") {
!isEmpty(BITS_PATH) {
include($$BITS_PATH/expat/expat.pri)
} else {
LIBS += -lexpat
}
DEFINES += HAVE_EXPAT
}
equals(HAVE_PTHREADS, "1") {
!isEmpty(BITS_PATH) {
include($$BITS_PATH/ptw/ptw.pri)
} else {
LIBS += -lpthread
}
DEFINES += HAVE_PTHREADS
}
equals(HAVE_RUBY, "1") {
!isEmpty(BITS_PATH) {
include($$BITS_PATH/ruby/ruby.pri)
}
DEFINES += \
HAVE_RUBY \
HAVE_RUBY_VERSION_CODE=$$RUBYVERSIONCODE
}
!isEmpty(RPATH) {
QMAKE_RPATHDIR += $$RPATH
}
!isEmpty(BITS_PATH) {
include($$BITS_PATH/zlib/zlib.pri)
} else {
!msvc {
LIBS += -lz
}
}
equals(HAVE_CRONOLOGY, "1") {
DEFINES += HAVE_CRONOLOGY
LIBS += $$CRONOLOGY_LIB
INCLUDEPATH += $$CRONOLOGY_INCLUDE
}
msvc {
QMAKE_CXXFLAGS += \
/bigobj \
/wd4251 \ # Disable "DLL interface required"
/source-charset:utf-8 \ # Use UTF-8 for source files
QMAKE_LFLAGS += \
/OPT:NOREF \ # preserves functions we want to keep for implementing the "force link" mechanism
QMAKE_CXXFLAGS_WARN_ON += \
# as we're using default-constructed iterators as "null" we can't have
# checked iterators with MSVC
DEFINES += _ITERATOR_DEBUG_LEVEL=0
} else {
2018-09-23 00:53:19 +02:00
CONFIG(gcov) {
QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
QMAKE_LFLAGS += --coverage
2018-09-23 00:53:19 +02:00
}
QMAKE_CXXFLAGS_WARN_ON += \
-pedantic \
-Woverloaded-virtual \
-Wsign-promo \
-Wsynth \
-Wno-deprecated \
-Wno-long-long \
-Wno-strict-aliasing \
-Wno-deprecated-declarations \
-Wno-reserved-user-defined-literal \
# because we use unordered_map/unordered_set:
QMAKE_CXXFLAGS += -std=c++0x
win32 {
QMAKE_LFLAGS += -Wl,--exclude-all-symbols
} else {
QMAKE_CXXFLAGS += -fvisibility=hidden
}
}
equals(HAVE_QT, "0") {
QT =
} else {
DEFINES += HAVE_QT
QT += core network xml sql
equals(HAVE_QT5, "1") {
QT += designer printsupport widgets
contains(QT_MODULES, "uitools") {
# not all distributions have uitools
QT += uitools
}
equals(HAVE_QTBINDINGS, "1") {
QT += multimedia multimediawidgets xmlpatterns svg gui
}
} else {
* #730: providing a new Qt module named QtUiTools for QUiLoader class support. * Fixed a compile error on Mac * Added QtUiTools to some more places * Fixed a linker issue in the QtUiTools Python lib * On occasion fixed a infinite recursion problem in the debugger The recursion happened because by mistake I instantiated a QApplication inside an in-application Python script. This crashed the debugger due to infinite recursion. This is not a real use case but to prevent similar issues, a recursion sentinel was added. * Removed QCoreApplication#notify from script bindings Reasoning: "notify" made standalone scripts using QApplication and QUiLoader virtually impossible. Problem description: - When a QApplication object is instantiated, e.g. in Python, the Qt binding will install reimplementation hooks as the object may be dynamically extended. - A notify is virtual this means the *every* "notify" call in the application is routed through the interpreter. - For one thing this will slow down the application - But as "notify" is called a zillion times this has more than this side effect. - Specifically "notify" is called from within the QWidget constructor to indicate a new widget. Then, if a QDialog for example is instatiated, it's base class constructor will call "notify" when the object isn't ready yet. - This has another severe side effect: as the object isn't ready yet, it gets registered in the Python space with the wrong class and QDialog is not visible as such. To mitigate these problems, the most efficient solution is to disable "notify" in general. There is hardly any use case in a script environment (in C++, apart from hacking the only reasonable use case is exception handling, but this does not apply to scripts). For providing the call functionality of "notify" you should better use "postEvent" or "sendEvent" anyway. So farewell QCoreApplication.notify ... * Fixed python test for QtUiTools module * Fixed UiTools test on Qt4 - QUiLoader needs an application object Co-authored-by: Kazunari Sekigawa <kazunari.sekigawa@gmail.com>
2021-02-25 21:29:21 +01:00
CONFIG += designer uitools
}
contains(QT_MODULES, "uitools") {
DEFINES += HAVE_QT_UITOOLS
}
}
VERSION_STRING = $$KLAYOUT_VERSION
VERSION_STRING_WITH_BLANKS = $$replace(VERSION_STRING, "\\.", " ")
eval(VERSION_ARRAY = $$VERSION_STRING_WITH_BLANKS)
KLAYOUT_MAJOR_VERSION = $$member(VERSION_ARRAY, 0)
KLAYOUT_MINOR_VERSION = $$member(VERSION_ARRAY, 1)
KLAYOUT_TINY_VERSION = $$member(VERSION_ARRAY, 2)
isEmpty(KLAYOUT_TINY_VERSION) {
KLAYOUT_TINY_VERSION = 0
}
DEFINES += \
KLAYOUT_VERSION=$$KLAYOUT_VERSION \
KLAYOUT_VERSION_REV=$$KLAYOUT_VERSION_REV \
KLAYOUT_VERSION_DATE=$$KLAYOUT_VERSION_DATE \
KLAYOUT_MAJOR_VERSION=$$KLAYOUT_MAJOR_VERSION \
KLAYOUT_MINOR_VERSION=$$KLAYOUT_MINOR_VERSION \
KLAYOUT_TINY_VERSION=$$KLAYOUT_TINY_VERSION \
VERSION = $$KLAYOUT_VERSION