<div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,0)"><div class="gmail_default" style="font-size:12.8px">Hi , <br></div><div class="gmail_default" style="font-size:12.8px">I'm using Cmake to create binary files as it can give a way to build my  application that will successfully compile on different platforms .<br></div><div class="gmail_default" style="font-size:12.8px">I use :<br></div><div class="gmail_default" style="font-size:12.8px">Linux -14.04<br></div><div class="gmail_default" style="font-size:12.8px">Cmake - 2.8.12 <br></div><div class="gmail_default" style="font-size:12.8px"><br></div><div class="gmail_default" style="font-size:12.8px">My .cpp code is called <a href="http://tsm_code_v3.cpp.it/" target="_blank">TSM_CODE_V3.cpp.It</a> depends on two external library files .1) armadillo 2) sndfile .<br></div><div class="gmail_default" style="font-size:12.8px">I scripted a CmakeLists.txt as follows :<br><br>CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)<br>PROJECT(TSM2)<br><br>FIND_LIBRARY(ARMADILLO armadillo)<br>MESSAGE(STATUS "Armadillo Library location: " ${ARMADILLO})<br><br>IF (NOT ARMADILLO_FOUND)<br>include(ExternalProject)<br>MESSAGE(STATUS "Armadillo not found in the system ,Trying to install armadillo...")<br>ExternalProject_Add(armadillo<br>  URL <a href="https://github.com/lsolanka/armadillo/archive/master.zip" target="_blank">https://github.com/lsolanka/<wbr>armadillo/archive/master.zip</a><br>  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/<wbr>armadillo-latest)<br>ENDIF()<br><br>FIND_LIBRARY(SNDFILE sndfile)<br>MESSAGE(STATUS "Sndfile Library location: " ${SNDFILE})<br><br>IF (NOT SNDFILE_FOUND)<br>include(ExternalProject)<br>MESSAGE(STATUS "Armadillo not found in the system ,Trying to install libsndfile...")<br>ExternalProject_Add(sndfile<br>  URL <a href="https://github.com/erikd/libsndfile/archive/master.zip" target="_blank">https://github.com/erikd/<wbr>libsndfile/archive/master.zip</a><br>  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/<wbr>sndfile-latest)<br>ENDIF()<br><br>ADD_EXECUTABLE(tsm ${PROJECT_SOURCE_DIR}/src/TSM_<wbr>CODE_V3.cpp)<br>TARGET_LINK_LIBRARIES(tsm ${ARMADILLO} ${SNDFILE})<br><br><br></div><div class="gmail_default" style="font-size:12.8px">I made use of ExternalProject_add to download the external libraries from the specified link address ,but when I try to compile the CmakeLists.txt , it throws an error of saying library not found .Basically , the external library is not downloaded from the specified link .<br><br><br></div><div class="gmail_default" style="font-size:12.8px">I'm not  sure where am I going wrong here .<br></div><div class="gmail_default" style="font-size:12.8px">Can anyone help me out ?<br><br></div><div class="gmail_default" style="font-size:12.8px">Hoping to hear from you..</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Regards,<br>Aishwarya Selvaraj</div></div>
</div>