after find_package is invoked, several variables will be set. You use these to
augment your compiler and linker information, e.g.:
target_include_directories(mytarget $ZLIB_INCLUDE_DIRS)
target_link_libraries(mytarget $ZLIB_LIBRARIES)
…and so on for other modules you find (OpenSSL, for
Although cmake uses the path I supplied for OpenSSL and Zlib, I do not see the
–I flag being used in compiling the code. (I set VERBOSE=1 to make to see what
it does.)
When I run ‘ldd’ against the resulting .so files, reference to libssl.so or
libcrypto.so is empty, i.e ‘libssl.so => not
Thanks for the help. I will try that.
Alex Chen
From: Michael Ellery
Date: Thursday, April 20, 2017 at 8:13 PM
To: Alex Chen
Cc: CMake
Subject: Re: [CMake] Overriding the include path, library path of OpenSSL, Zlib
and
It doesn’t look like that find module directly supports HINTS or PATHS, so you
can try setting CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH
(https://cmake.org/cmake/help/v3.7/variable/CMAKE_LIBRARY_PATH.html) before
calling the curl finder. I think you can add to those variables whatever paths
The source code I want to compile on Linux uses ‘FindOpenSSL’, ‘FindZLIB’, and
‘FindCURL’ to resolve the paths of these libraries.
However, I have newer version of these libraries in different locations. How
to I override these to use my paths?
I am able to use OPENSSL_ROOT_DIR, from