Generate source includes in a separate file, if needed.
The source includes shouldn't be used by installations, so don't install the extra file, but only use it if the package is used from the build-dir. Task-number: QTBUG-33970 Change-Id: I08f91b8a716e935cb04d1233d44cf5c092e240ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
e29b35024e
commit
786b278f91
@ -35,6 +35,15 @@ split_incpath {
|
||||
CMAKE_SOURCE_PRIVATE_INCLUDES = \
|
||||
$$cmakeTargetPath($$QT_MODULE_INCLUDE_BASE/Qt$${CMAKE_MODULE_NAME}/$$eval(QT.$${MODULE}.VERSION)) \
|
||||
$$cmakeTargetPath($$QT_MODULE_INCLUDE_BASE/Qt$${CMAKE_MODULE_NAME}/$$eval(QT.$${MODULE}.VERSION)/Qt$${CMAKE_MODULE_NAME})
|
||||
|
||||
cmake_extra_source_includes.input = $$PWD/data/cmake/ExtraSourceIncludes.cmake.in
|
||||
cmake_extra_source_includes.output = $$DESTDIR/cmake/Qt5$${CMAKE_MODULE_NAME}/ExtraSourceIncludes.cmake
|
||||
|
||||
!build_pass:QMAKE_SUBSTITUTES += \
|
||||
cmake_extra_source_includes
|
||||
|
||||
cmake_qt5_module_files.files = \
|
||||
$$cmake_extra_source_includes.output
|
||||
}
|
||||
|
||||
CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
|
||||
|
7
mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in
Normal file
7
mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
|
||||
$$CMAKE_SOURCE_INCLUDES
|
||||
)
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
||||
$$CMAKE_SOURCE_PRIVATE_INCLUDES
|
||||
)
|
@ -121,12 +121,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
!!ENDIF
|
||||
!!ENDIF
|
||||
!!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
|
||||
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
|
||||
$$CMAKE_SOURCE_INCLUDES
|
||||
)
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
||||
$$CMAKE_SOURCE_PRIVATE_INCLUDES
|
||||
)
|
||||
include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
|
||||
!!ENDIF
|
||||
!!ELSE
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS)
|
||||
|
Loading…
Reference in New Issue
Block a user