[CMake] CMake toolchain and FIND_PACKAGE(OpenSSL)
Eric Noulard
eric.noulard at gmail.com
Mon Nov 19 08:55:48 EST 2012
2012/11/19 Boards Killer <boards.killer at gmail.com>:
> Hi CMake Community !
>
> I am writing a CMake toolchain to cross compile our CMake project with the
> Ubuntu ARM Linux toolchain. The CMake toolchain is given below.
>
> I am facing the following problem. When using:
> FIND_PACKAGE(OpenSSL)
>
> The libraries (lssl, lcrypto) are *not* found. There are actually located at
> $ENV{SDK_TARGET}/lib
>
> I thought that adding a LINK_DIRECTORIES to the toolchain would do the
> trick, but no avail.
I'm pretty sure LINK_DIRECTORIES should not be used in toolchain
if not use at all.
The purpose of find_package is precisely to find the full path to libraries
thus not to need to use "LINK_DIRECTORIES".
> What is the best way to tell CMake where to find the libraries? Should I set
> the path manually in the toolchain, for instance.
Nope. you shoud throw away
INCLUDE_DIRECTORIES
and
LINK_DIRECTORIES
from your toolchain
and then retry in order to see what happen with find_package(OpenSSL)
proper setting of
CMAKE_FIND_ROOT_PATH* should makes it possible for FindOpenSSL to find
the lib.
By the way, which version of CMake are you using?
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list