Skip to content

Commit 8b45679

Browse files
jcfrjamesobutler
authored andcommitted
cmake: Prefer PythonQt_QtAll and remove PythonQt_QtBindings
1 parent 5fd6a0b commit 8b45679

4 files changed

Lines changed: 8 additions & 88 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ set(sources
176176
src/PythonQtThreadSupport.cpp
177177
src/gui/PythonQtScriptingConsole.cpp
178178

179-
generated_cpp${generated_cpp_suffix}/PythonQt_QtBindings.cpp
179+
extensions/PythonQt_QtAll/PythonQt_QtAll.cpp
180180

181181
generated_cpp${generated_cpp_suffix}/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin0.cpp
182182
generated_cpp${generated_cpp_suffix}/com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin_init.cpp
@@ -215,7 +215,7 @@ set(headers
215215
src/PythonQtUtils.h
216216
src/PythonQtVariants.h
217217
src/PythonQtPythonInclude.h
218-
generated_cpp${generated_cpp_suffix}/PythonQt_QtBindings.h
218+
extensions/PythonQt_QtAll/PythonQt_QtAll.h
219219
)
220220

221221
#-----------------------------------------------------------------------------
@@ -227,7 +227,9 @@ foreach(qtlib ${qtlibs})
227227

228228
if (${PythonQt_Wrap_Qt${qt_wrapped_lib}})
229229

230-
ADD_DEFINITIONS(-DPYTHONQT_WRAP_Qt${qt_wrapped_lib})
230+
# Variable expected by PythonQt_QtAll.cpp
231+
string(TOUPPER ${qt_wrapped_lib} qt_wrapped_lib_uppercase)
232+
ADD_DEFINITIONS(-DPYTHONQT_WITH_${qt_wrapped_lib_uppercase})
231233

232234
set(file_prefix generated_cpp${generated_cpp_suffix}/com_trolltech_qt_${qt_wrapped_lib}/com_trolltech_qt_${qt_wrapped_lib})
233235

@@ -288,6 +290,7 @@ target_compile_options(PythonQt PRIVATE
288290
target_include_directories(PythonQt
289291
PUBLIC
290292
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
293+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/extensions/PythonQt_QtAll>
291294
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>
292295
$<INSTALL_INTERFACE:${PythonQt_INSTALL_INCLUDE_DIR}>
293296
PRIVATE

generated_cpp_515/PythonQt_QtBindings.cpp

Lines changed: 0 additions & 73 deletions
This file was deleted.

generated_cpp_515/PythonQt_QtBindings.h

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/PythonQtTestCleanup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "PythonQtTestCleanup.h"
22
#include "PythonQt.h"
3-
#include "PythonQt_QtBindings.h"
3+
#include "PythonQt_QtAll.h"
44

55
void PythonQtTestCleanup::initTestCase() {}
66

@@ -11,7 +11,7 @@ void PythonQtTestCleanup::init()
1111
// Initialize before each test
1212

1313
PythonQt::init(PythonQt::IgnoreSiteModule);
14-
PythonQt_init_QtBindings();
14+
PythonQt_QtAll::init();
1515

1616
_helper = new PythonQtTestCleanupHelper();
1717
PythonQtObjectPtr main = PythonQt::self()->getMainModule();

0 commit comments

Comments
 (0)