Skip to content

Commit 6f43ed4

Browse files
committed
[commontk] cmake: Prefer using CorePrivate Qt target
This removes the use of version-specific Qt variable like `Qt5Core_PRIVATE_INCLUDE_DIRS` and instead relies on CMake’s imported targets for private headers.
1 parent 4d4800b commit 6f43ed4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,15 +292,15 @@ target_include_directories(PythonQt
292292
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/extensions/PythonQt_QtAll>
293293
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>
294294
$<INSTALL_INTERFACE:${PythonQt_INSTALL_INCLUDE_DIR}>
295-
PRIVATE
296-
# Required for use of "QtCore/private/qmetaobjectbuilder_p.h" in "PythonQt.cpp"
297-
${Qt5Core_PRIVATE_INCLUDE_DIRS}
298295
)
299296

300297
target_link_libraries(PythonQt
301298
PUBLIC
302299
Python3::Python
303300
${QT_LIBRARIES}
301+
PRIVATE
302+
# Required for use of "QtCore/private/qmetaobjectbuilder_p.h" in "PythonQt.cpp"
303+
Qt${PythonQt_QT_VERSION}::CorePrivate
304304
)
305305

306306
#-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)