From f5c7cac4a857fcb042d9ef3c78ca8b72c052ea2d Mon Sep 17 00:00:00 2001 From: Iakov 'Jake' Kirilenko Date: Sat, 3 Apr 2021 14:59:01 +0300 Subject: [PATCH] Tune build --- PythonQt.pro | 13 ++++++++++--- build/python.prf | 2 +- .../com_trolltech_qt_core2.cpp | 1 - .../com_trolltech_qt_core/com_trolltech_qt_core2.h | 3 --- src/src.pri | 3 ++- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/PythonQt.pro b/PythonQt.pro index a3467e01..814ce40a 100644 --- a/PythonQt.pro +++ b/PythonQt.pro @@ -1,7 +1,14 @@ TEMPLATE = subdirs -CONFIG += ordered SUBDIRS = src extensions -CONFIG(tests) { SUBDIRS += tests } -CONFIG(generator) { SUBDIRS += generator } +extensions.depends += src + +CONFIG(tests) { + SUBDIRS += tests + tests.depends += extensions +} + +CONFIG(generator) { + SUBDIRS += generator +} diff --git a/build/python.prf b/build/python.prf index e3311cca..3801e601 100644 --- a/build/python.prf +++ b/build/python.prf @@ -3,7 +3,6 @@ # Change this variable to your python version (3.5, 3,7, 3.8, ...) isEmpty(PYTHON3_VERSION_MINOR):PYTHON3_VERSION_MINOR=7 unix:PYTHON_VERSION=UNKNOWN_BECAUSE_DETECT_FAILED - win32 { # for windows install a Python development kit or build Python yourself from the sources # Make sure that you set the environment variable PYTHON_PATH to point to your @@ -30,6 +29,7 @@ win32 { message(PYTHON_VERSION is detected as $$PYTHON_VERSION) INCLUDEPATH += $$PYTHON_PATH/PC $$PYTHON_PATH/include LIBS += -L$$PYTHON_LIB -lpython$${PYTHON_VERSION} + mingw:DEFINES += HAVE_ROUND } else:unix { # workaround Qt issue https://bugreports.qt.io/browse/QTBUG-56164 diff --git a/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.cpp b/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.cpp index 8dfbd617..3cb93163 100644 --- a/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.cpp +++ b/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.cpp @@ -43,7 +43,6 @@ #include #include #include -#include QModelIndex* PythonQtWrapper_QModelIndex::new_QModelIndex() { diff --git a/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.h b/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.h index 8e700a65..24f50c8b 100644 --- a/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.h +++ b/generated_cpp_5.12/com_trolltech_qt_core/com_trolltech_qt_core2.h @@ -44,9 +44,6 @@ #include #include #include -#include - - class PythonQtWrapper_QModelIndex : public QObject { Q_OBJECT diff --git a/src/src.pri b/src/src.pri index 6492874e..9ca3f4d3 100644 --- a/src/src.pri +++ b/src/src.pri @@ -6,7 +6,8 @@ CONFIG += c++11 !no_warn:gcc: QMAKE_CXXFLAGS += -Werror # This was needed to work around "number of sections exceeded object file format limit" linker error -win32:!gcc:QMAKE_CXXFLAGS += /bigobj +win32-msvc*:!gcc:QMAKE_CXXFLAGS += /bigobj +win32-g++: QMAKE_CXXFLAGS += -Wa,-mbig-obj HEADERS += \ $$PWD/PythonQt.h \