Skip to content

Commit 651375d

Browse files
jcfrjamesobutler
authored andcommitted
Add macro pythonqt_wrap_cpp removing the need for qt version specific macros
1 parent 24cc01e commit 651375d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ else()
9696
message(FATAL_ERROR "error: Qt4 was not found on your system. You probably need to set the QT_QMAKE_EXECUTABLE variable")
9797
endif()
9898

99+
macro(pythonqt_wrap_cpp)
100+
qt4_wrap_cpp(${ARGV})
101+
endmacro()
102+
99103
#-----------------------------------------------------------------------------
100104
# The variable "generated_cpp_suffix" allows to conditionnally compile the generated wrappers
101105
# associated with the Qt version being used.
@@ -210,7 +214,7 @@ endforeach()
210214

211215
#-----------------------------------------------------------------------------
212216
# Do wrapping
213-
qt4_wrap_cpp(gen_moc_sources ${moc_sources})
217+
pythonqt_wrap_cpp(gen_moc_sources ${moc_sources})
214218

215219
#-----------------------------------------------------------------------------
216220
# Build the library
@@ -265,7 +269,7 @@ if(BUILD_TESTING)
265269
tests/PythonQtTests.h
266270
)
267271

268-
QT4_WRAP_CPP(test_sources
272+
pythonqt_wrap_cpp(test_sources
269273
tests/PythonQtTests.h
270274
)
271275

@@ -276,7 +280,7 @@ if(BUILD_TESTING)
276280
tests/PythonQtTestCleanup.cpp
277281
tests/PythonQtTestCleanup.h
278282
)
279-
QT4_WRAP_CPP(test_sources
283+
pythonqt_wrap_cpp(test_sources
280284
tests/PythonQtTestCleanup.h
281285
)
282286

0 commit comments

Comments
 (0)