From ae080facf513f943727b816589eb7152fb191ba7 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 23 Apr 2020 11:00:30 +0200 Subject: CMake build: export less generic public includes Do not put every plugin's and lib's source folder into public includes. We require includes of the style and if someone depends on somelib or someplugin. Change-Id: I3a9f200b7c3879cf431b00a1bab4a70f7aa0a9ec Reviewed-by: Cristian Adam --- cmake/QtCreatorAPI.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'cmake') diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 993102e139a..f6387b7919f 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -496,11 +496,11 @@ function(add_qtc_library name) file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(${name} - PRIVATE ${_arg_INCLUDES} - PUBLIC + PRIVATE + ${_arg_INCLUDES} "$" + PUBLIC "$" - "$" "$" ) set_public_includes(${name} "${_arg_PUBLIC_INCLUDES}") @@ -755,10 +755,9 @@ function(add_qtc_plugin target_name) ${_arg_INCLUDES} "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_BINARY_DIR}/src" - PUBLIC "$" + PUBLIC "$" - "$" "$" ) set_public_includes(${target_name} "${_arg_PUBLIC_INCLUDES}") @@ -886,7 +885,7 @@ function(extend_qtc_target target_name) if (NOT IS_ABSOLUTE ${_arg_SOURCES_PREFIX}) set(_arg_SOURCES_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_SOURCES_PREFIX}") endif() - target_include_directories(${target_name} PUBLIC $) + target_include_directories(${target_name} PRIVATE $) set(_arg_SOURCES ${prefixed_sources}) endif() -- cgit v1.2.3