[CMake] CMake finding custom packages...

BRM bm_witness at yahoo.com
Thu Apr 30 17:53:26 EDT 2015


I'm trying to convert a project over to using CMake. We have a series of dependency libraries that we custom compile and link against.For a number of them there is no issue since CMake either has no module for them or there is nothing to link with.However, I am having trouble with a few of them.
This is all with CMake 2.8.9 as that is what is available under Debian Wheezy (my build system). I'm not opposed to using a newer version (we already build a number of things ourselves); but I want to ensure that things would be fixed before doing so if that was truly the path to resolving the issues.

1. OpenSSL:
SET ( ENV{OPENSSL_ROOT_DIR} /path/to/my/libraries )FIND_PACKAGE(OpenSSL REQUIRED)
This find OpenSSL, but not the one under /path/to/my/libraries. Are the bug fixes related to honoring OPENSSL_ROOT_DIR after Cmake 2.8.9?
2. Curl
I've tried a number of methods. Our version of Curl is also built against our version of OpenSSL; and they are installed under the same path.Further we have tended to needing to use PkgConfig to get it to work correctly in our previous build system.
I have tried a number of things, however, I can't seem to get it to reliably find Curl. (I had it, then I cleaned up the environment and it won't find it again.)My biggest challenge here is that there is no equivalent of OPENSSL_ROOT_DIR or any other kinds of hints.I've tried using FindPackage(CURL...), FindPackage(PkgConfig,...)/PKG_CHECK_MODULES(CURL..).A co-worker suggested using CMAKE_FIND_ROOT_PATH, but that hasn't helped either.

Any suggestions would be welcome. I'd really like to move us from the old system to cmake and unify our platforms on a single build system generator so we don't have to maintain two build environments.
TIA,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150430/e7c0cc8d/attachment.html>


More information about the CMake mailing list