Skip to content

Commit adcefed

Browse files
committed
Fix system-wide installed libraries were shadowing bundled library headers
Fixes an issue when headers from system-wide install library (e.g., flac from brew) were included instead of our headers SYSTEM was introduced in cmake 3.25, hence version bump
1 parent d91393f commit adcefed

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

buildtools/manifest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# - every consumed dep is appended to the EXTDEPS_CONSUMED global property
44
# - per-dep globals (<name>_INSTALL_LIBRARIES, <name>_PREFIX)
55

6-
cmake_minimum_required(VERSION 3.24)
6+
cmake_minimum_required(VERSION 3.25)
77

88
get_filename_component(EXTDEPS_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
99

buildtools/resolve.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.24)
1+
cmake_minimum_required(VERSION 3.25)
22

33
get_filename_component(_EXTDEPS_ROOT "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
44
include("${CMAKE_CURRENT_LIST_DIR}/build_dependency.cmake")
@@ -57,6 +57,8 @@ endfunction()
5757
function(_extdeps_make_target target include_dirs link_libraries)
5858
if(target AND NOT TARGET ${target})
5959
add_library(${target} INTERFACE IMPORTED GLOBAL)
60+
# non-SYSTEM so dep headers have the priority over system headers
61+
set_property(TARGET ${target} PROPERTY SYSTEM FALSE)
6062
target_include_directories(${target} INTERFACE ${include_dirs})
6163
target_link_libraries(${target} INTERFACE ${link_libraries})
6264
endif()

0 commit comments

Comments
 (0)