[CMake] To include external libraries using Cmake
aishwarya selvaraj
aishwaryaselvaraj1708 at gmail.com
Thu Jan 5 05:10:32 EST 2017
Thanks for feedback :
> IF (${ARMADILLO} STREQUAL “ARMADILLO-NOTFOUND”)
> # do what you want
> ENDIF ()
I tried this way of writing :
IF (${ARMADILLO} STREQUAL "ARMADILLO-NOTFOUND")
include(ExternalProject)
ExternalProject_Add(armadillo
URL https://github.com/lsolanka/armadillo/archive/master.zip
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-latest)
ENDIF()
and
IF (ARMADILLO STREQUAL ARMADILLO-NOTFOUND)
include(ExternalProject)
MESSAGE(STATUS "Trying to install armadillo...")
ExternalProject_Add(armadillo
URL https://github.com/lsolanka/armadillo/archive/master.zip
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-latest)
ENDIF()
But both of them gave me an error :
--
* Armadillo Library location: ARMADILLO-NOTFOUND-- Trying to install
armadillo...-- Sndfile Library location: SNDFILE-NOTFOUND-- Trying to
install libsndfile...CMake Error: The following variables are used in this
project, but they are set to NOTFOUND.Please set them or make sure they are
set and tested correctly in the CMake files:ARMADILLO linked by target
"tsm" in directory /home/computing9/TSM_cmakeSNDFILE linked by target
"tsm" in directory /home/computing9/TSM_cmake-- Configuring incomplete,
errors occurred!See also
"/home/computing9/TSM_cmake/build/CMakeFiles/CMakeOutput.log".*
ExternalProject_add command is not instlling the mentioned libraries from
the specifies link .
Any suggestions ?
Regards
Aishwarya Selvaraj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170105/aaf01a7c/attachment.html>
More information about the CMake
mailing list