{"author":"Viktor Szakats","author_email":"commit@vsz.me","author_time":1735031551,"commit_time":1735159615,"committer":"Viktor Szakats","committer_email":"commit@vsz.me","hash":"98f419172b060786a45cce39a1ff4e53c5150f37","message":"cmake/FindLibpsl: protect against `pkg-config` \"half-detection\"\n\nSame issue as seen before with libssh2: `libpsl`'s pkg-config module\ndepends on another module, but that's not found. CMake ends up reporting\n`LIBPSL_FOUND=YES`, while leaving `LIBPSL_INCLUDE_DIRS` empty. Then\nthe build fails to find `psl.h`.\n\nThe missing dependency in this case is `icu4c`, which is \"keg-only\",\nmeaning it's not exposed in the default Homebrew header, pkg-config,\nlib, etc locations. It must be added to the `PKG_CONFIG_PATH` env, as\nsuggested by the warnings messages of `pkgconf`.\n\nTo avoid this fallout, let's ensure that `LIBPSL_INCLUDE_DIRS` is\nnon-empty when detecting via `pkg-config` and fall back to the CMake\ndetection method otherwise.\n\nThis was an issue till Homebrew libpsl 0.21.5_1, fixed in 0.21.5_2, that\nno longer depends on `icu4c`.\n\nExample log:\n```\n-- Checking for module 'libpsl'\n--   Found libpsl, version 0.21.5\nPackage icu-uc was not found in the pkg-config search path.\nPerhaps you should add the directory containing `icu-uc.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'icu-uc', required by 'libpsl', not found\n[...]\n-- Found Libpsl (via pkg-config):  (found version \"0.21.5\")\n[...]\nIn file included from curl/_bld/lib/CMakeFiles/libcurl_static.dir/Unity/unity_0_c.c:4:\nIn file included from curl/lib/altsvc.c:32:\nIn file included from curl/lib/urldata.h:145:\ncurl/lib/psl.h:28:10: fatal error: 'libpsl.h' file not found\n         ^~~~~~~~~~\n1 error generated.\n```\n\nFollow-up to 39c741b7b008b5959980b29ac721357ff75de3f5 #15408\nCloses #15827\n","parents":["32bc4288262f704e2e1f4e9f8dd9c06ece314b5f"],"tree_hash":"3d1a7db748d074bbfdac6636a97081536ee8d5ae"}