From 08d2d6cb00633760d5c4ee6e685facef70d82469 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Tue, 14 Jun 2022 15:08:41 -0300 Subject: [PATCH] build: widen find_external_library header search scope --- build-support/macros-and-definitions.cmake | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/build-support/macros-and-definitions.cmake b/build-support/macros-and-definitions.cmake index 6141a887c..d816aeb68 100644 --- a/build-support/macros-and-definitions.cmake +++ b/build-support/macros-and-definitions.cmake @@ -1960,18 +1960,13 @@ function(find_external_library) list(APPEND parent_dirs ${libdir} ${parent_libdir} ${parent_parent_libdir}) endforeach() - # If we already found a library somewhere, limit the search paths for the - # header - if(parent_dirs) - set(header_search_paths ${parent_dirs}) - set(header_skip_system_prefix NO_CMAKE_SYSTEM_PATH) - else() - set(header_search_paths - ${search_paths} ${CMAKE_OUTPUT_DIRECTORY} # Search for headers in - # ns-3-dev/build - ${CMAKE_INSTALL_PREFIX} # Search for headers in the install - ) - endif() + set(header_search_paths + ${parent_dirs} + ${search_paths} + ${CMAKE_OUTPUT_DIRECTORY} # Search for headers in + # ns-3-dev/build + ${CMAKE_INSTALL_PREFIX} # Search for headers in the install + ) set(not_found_headers) set(include_dirs)