<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi, try setting <br>
<br>
packagename_DIR before FIND_PACKAGE() <br>
<br>
19.11.2012 14:41, Boards Killer пишет:<br>
</div>
<blockquote
cite="mid:CAHmayRomd4kdXh5Z5vQZ6tUOCrzSeN71RQfMj5OfJJhmQ1xGmA@mail.gmail.com"
type="cite">Hi CMake Community !<br>
<br>
I am writing a CMake toolchain to cross compile our CMake project
with the Ubuntu ARM Linux toolchain. The CMake toolchain is given
below. <br>
<br>
I am facing the following problem. When using:<br>
FIND_PACKAGE(OpenSSL) <br>
<br>
The libraries (lssl, lcrypto) are *not* found. There are actually
located at <br>
$ENV{SDK_TARGET}/lib<br>
<br>
I thought that adding a LINK_DIRECTORIES to the toolchain would do
the trick, but no avail. <br>
<br>
What is the best way to tell CMake where to find the libraries?
Should I set the path manually<br>
in the toolchain, for instance.<br>
<br>
TIA, <br>
/ld<br>
-- <br>
# Cmake toolchain for cross compiling <br>
<br>
# target system type<br>
SET(CMAKE_SYSTEM_NAME Linux)<br>
SET(CMAKE_SYSTEM_VERSION 1)<br>
SET(CMAKE_SYSTEM_PROCESSOR armv7l)<br>
<br>
INCLUDE_DIRECTORIES(SYSTEM "$ENV{SDK_TARGET}/usr/include")<br>
INCLUDE_DIRECTORIES(SYSTEM
"$ENV{SDK_TARGET}/usr/include/arm-linux-gnueabi")<br>
LINK_DIRECTORIES("$ENV{SDK_TARGET}/lib")<br>
<br>
# specify the cross compiler<br>
SET(CMAKE_C_COMPILER arm-linux-gnueabi-gcc)<br>
SET(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++)<br>
<br>
# location of target environment<br>
SET(CMAKE_FIND_ROOT_PATH $ENV{SDK_TARGET})<br>
<br>
# search for programs in the build host directories<br>
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br>
<br>
# for libraries and headers in the target directories<br>
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br>
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
</blockquote>
<br>
</body>
</html>