FindPkgConfig: Tolerate include directory order in test

This commit is contained in:
Volodymyr Zolotopupov
2026-06-29 15:43:55 -04:00
committed by Brad King
parent 088aef1e68
commit 9555f80ea8
@@ -130,6 +130,9 @@ if(NOT WIN32)
get_target_property(inc_dirs ${tgt} INTERFACE_INCLUDE_DIRECTORIES)
set(expected_inc_dirs "/special" "/other" "/more")
# pkg-config does not guarantee preserving the order from the .pc file
list(SORT inc_dirs)
list(SORT expected_inc_dirs)
if (NOT inc_dirs STREQUAL expected_inc_dirs)
message(FATAL_ERROR