Hi, I'm using CMake for cross-compilation, and I have a toolchain file which sets CMAKE_SYSTEM_PREFIX_PATH accordingly. I'm running into issues with pkg_check_modules not finding some modules because it only searches inside CMAKE_PREFIX_PATH and not CMAKE_SYSTEM_PREFIX_PATH (where my *.pc files are located).
I'm wondering why this is the case. From my understanding, CMAKE_SYSTEM_PREFIX_PATH is intended to contain prefixes for the system, and CMAKE_PREFIX_PATH is intended to contain prefixes for the project. In this case, since I'm cross-compiling (which defines my "system"), it seems appropriate to set CMAKE_SYSTEM_PREFIX_PATH inside my toolchain file, but then that doesn't end up influencing the pkg-config search as I would like. Should I be setting CMAKE_PREFIX_PATH inside my toolchain file, either instead of or in addition to CMAKE_SYSTEM_PREFIX_PATH, or should pkg_check_modules also honor CMAKE_SYSTEM_PREFIX_PATH? I suppose another option would be to set the PKG_CONFIG_PATH environment variable inside my toolchain file directly, but that seems kinda ugly. Thanks, Shoaib
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake