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>