My problem concerns
find_package() in the “Config” mode.
I created a
PDFiumConfig.cmake and set the environment variable
PDFium_DIR to the correct directory.
find_package() works fine for all platforms except for iOS: as soon as
CMAKE_SYSTEM_NAME is defined, it ignores the
PDFium_DIR environment variable.
Curiously, when I run with
--debug-find, I can see that the environment variable is considered:
Env variable PDFium_DIR [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH]. /Users/runner/work/pdfium-binaries/pdfium-binaries/staging
Of course, I listed the directory to ensure that
PDFiumConfig.cmake is present; moreover, I use the same setup for the eleven other platforms, and they work.
I think I tried every possible combination of
CMAKE_FIND_FRAMEWORK. I also searched the documentation thoroughly and even looked at CMake’s source code, but I couldn’t understand why it didn’t work.
You can find more information about this problem there:
- CMake’s invocation
- CMake’s output
- The failing build on the “Actions” tab on the GitHub project page
(as a new user, I can only have two links in a post)
Any help would be greatly appreciated!