Fix build of installed header-only modules in non-prefix builds
QtUiTools in qttools is a public module that has only headers, so it's an interface library in cmake. That means INTERFACE_INCLUDE_DIRECTORIES cannot contain paths to the source or build directory, unless they are prefixed with BUILD_INTERFACE, which this patch adds. Change-Id: I047700f447237dfbe5a901072eb413a159ae537d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
b2a11daaa1
commit
bc54f0b164
@ -1305,8 +1305,8 @@ function(add_qt_module target)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(private_includes
|
set(private_includes
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
|
||||||
${arg_INCLUDE_DIRECTORIES}
|
${arg_INCLUDE_DIRECTORIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1316,8 +1316,8 @@ function(add_qt_module target)
|
|||||||
# from another module.
|
# from another module.
|
||||||
if(NOT arg_NO_SYNC_QT)
|
if(NOT arg_NO_SYNC_QT)
|
||||||
list(APPEND private_includes
|
list(APPEND private_includes
|
||||||
"${module_include_dir}/${PROJECT_VERSION}"
|
"$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>"
|
||||||
"${module_include_dir}/${PROJECT_VERSION}/${module}")
|
"$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
|
||||||
|
|
||||||
list(APPEND public_includes
|
list(APPEND public_includes
|
||||||
# For the syncqt headers
|
# For the syncqt headers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user