[CMake] cmake to download and compile fftw library

2017-05-18 Thread aishwarya selvaraj
Hi all,
I have written the below cmakelist.txt .



CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(PROSE)


include(ExternalProject)
MESSAGE(STATUS "Trying to install fftw...")

ExternalProject_Add(project_fftw
  #GIT_REPOSITORY  https://github.com/FFTW/fftw3
  URL "http://www.fftw.org/fftw-3.3.2.tar.gz;
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fftw
  CONFIGURE_COMMAND ""
#--Build step-
  BUILD_COMMAND ""
#--Install step---
  UPDATE_COMMAND "" # Skip annoying updates for every build
  INSTALL_COMMAND ""
 )

ADD_LIBRARY(fftw INTERFACE)


TARGET_INCLUDE_DIRECTORIES(fftw INTERFACE
"${install_dir}/src/project_fftw/api/")


​ADD_EXECUTABLE(prose ${PROJECT_SOURCE_DIR}/src/read.cpp)
TARGET_LINK_LIBRARIES(prose fftw  )
​


​But when I run it in cygwin (windows) I get the following error:
*Scanning dependencies of target prose*
*[ 94%] Building CXX object CMakeFiles/prose.dir/src/read.cpp.o*
*/home/computing7/prose/src/read.cpp:17:19: fatal error: fftw3.h: No such
file or directory*
*compilation terminated.*
*make[2]: *** [CMakeFiles/prose.dir/build.make:63:
CMakeFiles/prose.dir/src/read.
 cpp.o] Error 1*
*make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/prose.dir/all] Error 2*
*make: *** [Makefile:84: all] Error 2*
​
​Could anyone please tell me on how to solve this problem .​

-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] fftw library in cmake

2017-04-21 Thread aishwarya selvaraj
Thanks Nils for the input .

On Fri, Apr 21, 2017 at 7:19 PM, Nils Gladitz <nilsglad...@gmail.com> wrote:

> On 04/21/2017 03:40 PM, aishwarya selvaraj wrote:
>
> add_library(fftw STATIC IMPORTED)
>
> [...]
>
> TARGET_LINK_LIBRARIES(prose fftw  )
>
> [...]
>
> make[2]: *** No rule to make target `fftw-NOTFOUND', needed by `prose'.
> Stop.
>
>
> You are creating an IMPORTED target "fftw" but you aren't populating its
> IMPORTED_LOCATION [1] (or IMPORTED_LOCATION_ [2]) target property.
> Without it CMake does not know what on disk library file to link to.
>
> You can set target properties with set_property() or
> set_target_properties().
>
> Nils
>
> [1] https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_LOCATION.html
> [2] https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_
> LOCATION_CONFIG.html
>



-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] fftw library in cmake

2017-04-21 Thread aishwarya selvaraj
Hi all ,
Below is my CMakelist.txt. I'm getting an error as mentioned below .
I'm not to rectify it .
Could anyone help me out here please ?

​CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(PROSE)
​
ExternalProject_Add(project_fftw
  #GIT_REPOSITORY  https://github.com/FFTW/fftw3
  URL "http://www.fftw.org/fftw-3.3.2.tar.gz;
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fftw
  CONFIGURE_COMMAND ""
#--Build step-
  BUILD_COMMAND ""
#--Install step---
  UPDATE_COMMAND "" # Skip annoying updates for every build
  INSTALL_COMMAND ""
 )

​include_directories(${CMAKE_CURRENT_BINARY_DIR}/fftw/src/project_fftw/api)
ExternalProject_Get_Property(project_fftw install_dir)
add_library(fftw STATIC IMPORTED)
add_dependencies(fftw project_fftw)

​ADD_EXECUTABLE(prose ${PROJECT_SOURCE_DIR}/src/prose.cpp)
TARGET_LINK_LIBRARIES(prose fftw  )

ERROR:
Scanning dependencies of target prose
[100%] Building CXX object CMakeFiles/prose.dir/src/prose.cpp.o
make[2]: *** No rule to make target `fftw-NOTFOUND', needed by `prose'.
Stop.
make[1]: *** [CMakeFiles/prose.dir/all] Error 2
make: *** [all] Error 2

Where Am I going wrong ?



-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Cmake for fftw library

2017-04-07 Thread aishwarya selvaraj
Hi all ,
I was writing CMakelist.txt to compile my cpp code(prose ) which makes use
of two external libraries :libsndfile and fftw .

The script I have written is below :



CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(PROSE)

include(ExternalProject)
MESSAGE(STATUS "Trying to install fftw...")

ExternalProject_Add(fftw
  #GIT_REPOSITORY  https://github.com/FFTW/fftw3
  URL "http://www.fftw.org/fftw-3.3.2.tar.gz;
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fftw_library
  CONFIGURE_COMMAND ""
#--Build step-
  BUILD_COMMAND ""
#--Install step---
  UPDATE_COMMAND "" # Skip annoying updates for every build
  INSTALL_COMMAND ""
 )
include_directories(${CMAKE_CURRENT_BINARY_DIR}/fftw_library/src/fftw/api)




include(ExternalProject)
MESSAGE(STATUS "Trying to install libsndfile...")

ExternalProject_Add(project_libsndfile
GIT_REPOSITORY  https://github.com/erikd/libsndfile.git
PREFIX  lib/libsndfile
CONFIGURE_COMMAND   /configure
BUILD_COMMAND   make
BUILD_IN_SOURCE 1
INSTALL_COMMAND echo Skipping install step for libsndfile
)
ExternalProject_Add_Step(project_libsndfile autogen
   COMMAND  /autogen.sh
   DEPENDEESupdate
   DEPENDERSconfigure
)

ExternalProject_Get_Property(project_libsndfile BINARY_DIR)
SET(libsndfile_lib_dir "${BINARY_DIR}/src/.libs")
SET(libsndfile_inc_dir "${BINARY_DIR}/src")


ADD_LIBRARY(libsndfile STATIC IMPORTED)
SET_PROPERTY(TARGET libsndfile PROPERTY IMPORTED_LOCATION
${libsndfile_lib_dir}/libsndfile.a)

SET(LIBSNDFILE_INCLUDE_PATH
"${install_dir}/src/project_libsndfile-build/src/")

INCLUDE_DIRECTORIES(include ${libsndfile_inc_dir})



ADD_EXECUTABLE(prose ${PROJECT_SOURCE_DIR}/src/prose.cpp)
TARGET_LINK_LIBRARIES(prose ${fftw} libsndfile )


​
When cmake .. is done building is done without any problem
But when make is one  , I get the following error:













*Linking CXX executable proseCMakeFiles/prose.dir/src/prose.cpp.o: In
function `prose(std::vector<double, std::allocator >, int,
double)':prose.cpp:(.text+0x1c86): undefined reference to
`fftw_plan_r2r_1d'prose.cpp:(.text+0x1c9c): undefined reference to
`fftw_execute'prose.cpp:(.text+0x311d): undefined reference to
`fftw_plan_r2r_1d'prose.cpp:(.text+0x3133): undefined reference to
`fftw_execute'collect2: error: ld returned 1 exit statusmake[2]: ***
[prose] Error 1make[1]: *** [CMakeFiles/prose.dir/all] Error 2make: ***
[all] Error 2*
Where Am I going wrong ?
Can anyone please help me out ?

P.S
*`fftw_plan_r2r_1d',*
* `fftw_execute' are functions from fftw library I have used to find dct .*


-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] libsndfile in windows

2017-03-23 Thread aishwarya selvaraj
@Johannes Zarl-Zierl
PFA .
I found this link and tried how its mentioned in it .
I was not able to successfully build it using this .
Probably you could go though this and we could discuss.

On Tue, Mar 21, 2017 at 6:52 PM, Johannes Zarl-Zierl <
johannes.zarl-zi...@jku.at> wrote:

> On Dienstag, 21. März 2017 15:24:13 CET you wrote:
> > > Did you try asking on the libsndfile mailing list?
> > I did .but there was no response .
>
> Ok then.
>
> > I had written cmakelists.txt to compile and build .
> > I was able to successfully built it in linux , but in windows I was not
> > able to do it .
> > Do you have nay leads on that ?
>
> Reading the description that you linked to, I see that they have only done
> a
> partial port to cmake and still require autotools. If you want to compile
> on
> other platforms you'll need to get rid of those non-portable parts.
>
> I would probably look at any pull requests and issues for that repository
> and
> look for cmake-related reports. Maybe someone else is already fixing the
> issues?
>
> Otherwise, you can try porting the non-portable parts yourself and ask on
> this
> list if you have problems in your cmake code.
>
> Cheers,
>   Johannes
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Regards,
Aishwarya Selvaraj
Title: 
	Building libsndfile on Win32
	







Building libsndfile on Win32


Note : For pre-compiled binaries for windows, see the main web page.



There are currently two ways of building libsndfile under Win32:


	 Using the free MinGW tools.
	 Using Cygwin (this is the full Cygwin without the -mno-cygwin option).



Building libsndfile using the microsoft compiler does not currently work.
Microsoft's compiler is a C++ compiler and does not compile a number of ISO 
C99 Standard constructs.
If you insist on compiling libsndfile with the microsoft compiler you are 
on your own.


However, even though the libsndfile source code cannot be compiled with
the microsoft compiler, the pre-compiled windows DLL distributed on the
main web page can be used with C++ projects compiled with the microsoft
compiler.



The free MinGW tools are the preferred option because they are a free (as in
beer and speech), easily obtainable and much closer to the Linux/GCC
environment on which libsndfile is developed.



Building libsndfile using MinGW.

The MinGW tools are available from 
http://www.mingw.org/.
The files you will need will be named something like:


	 msysDTK-1.0.1.exe
	 MSYS-1.0.10.exe
	 gcc-core-3.4.2-20040916-1.tar.gz
	 gcc-g++-3.4.2-20040916-1.tar.gz
	 binutils-2.15.91-20040901-1.tar.gz
	 mingw-runtime-3.9.tar.gz
	 w32api-3.6.tar.gz
	 mingw-utils-0.3.tar.gz



They should be installed using the directions on the MinGW site.
I know the instructions aren't great, but I don't have the time or expertise
to write better ones.



Once you have the tools installed you will get an icon named MSYS on
your desktop.
Clicking on that icon will bring up something that looks a little like an
xterm.



Assuming that you have downloaded the .tar.gz file into the
C:\temp\ directory you should now be able to execute the following
commands:



		tar zxf /c/temp/libsndfile.X.Y.Z.tar.gz
		cd libsndfile-X.Y.Z
		./configure
		make
		make check



If there is a failure during compiling or the "make check" stage, you should
check that you are using the current stable version of the MinGW tools, and
the latest version of libsndfile before sending the author a bug report.



Once this is done, anyone interested in using libsndfile in other projects
will be interested in the following files:


	 libsndfile.dll
	 libsndfile.lib
	 libsndfile.def
	 src/sndfile.h
	 doc/*.html





Compile Problems


Compile problems using the above method of building the libsndfile DLL on Win32 should
be emailed to
	
		Erik de Castro Lopo.



If you are using some other method to compile the libsndfile DLL you are on your own.











-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/hel

Re: [CMake] libsndfile in windows

2017-03-21 Thread aishwarya selvaraj
I did .but there was no response .
I had written cmakelists.txt to compile and build .
I was able to successfully built it in linux , but in windows I was not
able to do it .
Do you have nay leads on that ?

On Tue, Mar 21, 2017 at 3:08 PM, Johannes Zarl-Zierl <
johannes.zarl-zi...@jku.at> wrote:

> Hi,
>
> On Dienstag, 21. März 2017 10:57:42 CET aishwarya selvaraj wrote:
> > I'm very new to all this , So Could anyone please guide me on what to do
> > next .
>
> Did you try asking on the libsndfile mailing list? They are more likely to
> know
> about the issue you're dealing with.
>
> Try here:
> http://www.mega-nerd.com/libsndfile/lists.html
>
> Cheers,
>   Johannes
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] libsndfile in windows

2017-03-20 Thread aishwarya selvaraj
Hello ,
To compile my code which uses libsndfile library on windows , i used the
cross compiling on linux for windows following the instructions in this :
https://github.com/erikd/libsndfile

I have cmake_build.sh file .
I'm very new to all this , So Could anyone please guide me on what to do
next .
​I'd be really grateful .​

-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] libsndfile in windows

2017-03-07 Thread aishwarya selvaraj
​Hi all ,
I'm trying to compile a .cpp code of mine using cmake file in all the three
platforms.
I have successfully completed it in Linux software .
when I started to do it in windows I read across multiple documents which
mention that ​libsnd file cannot be built on windows using visual studio ,
instead its possible using MINGW , but there was support documents for the
same .
Has anyone already done something similiar .
Could you please provide some knowledge?


-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] libsndfile in winodws

2017-03-02 Thread aishwarya selvaraj
@Dan Liew
Thanks for your feedback.
Yes I was trying to proceed in that direction .
Did you find any links which could be useful ?
could you kindly share them ?
Thanks

On Thu, Mar 2, 2017 at 5:08 PM, Dan Liew <d...@su-root.co.uk> wrote:

> On 2 March 2017 at 12:07, aishwarya selvaraj
> <aishwaryaselvaraj1...@gmail.com> wrote:
> > Hi all ,
> > I was trying to build my .cpp file in windows in Windows platform
> (windows
> > 10) using cmake .
> > My .cpp file makes use of two external libraries 1)armadillo 2)libsnd
> file.
> > I have written a corresponding cmakelist.txt to compile and obtain the
> > binary .
> > I was successful in doing so in Linux , when it come to Windows I obtain
> the
> > following error .
> >
> > 3>Time Elapsed 00:00:02.06
> > 2> Current branch master is up to date.
> > 2> No patch step for 'project_libsndfile'
> > 2> Performing autogen step for 'project_libsndfile'
> > 2> Performing configure step for 'project_libsndfile'
> > 2>
> > 'C:\Users\computing7\Desktop\TSM_cmake\build\lib\libsndfile\src\project_
> libsndfile\configure'
> > is not recognized as an internal or external command,
> > 2> operable program or batch file.
>
> Above is your clue. Your build could not run `configure`. Your problem
> is most likely in
>
> ```
> ExternalProject_Add(project_libsndfile
> GIT_REPOSITORY https://github.com/erikd/libsndfile.git
> PREFIX  lib/libsndfile
> CONFIGURE_COMMAND   /configure
> BUILD_COMMAND   make
> BUILD_IN_SOURCE 1
> INSTALL_COMMAND echo Skipping install step for libsndfile
> )
> ```
>
> Running a `configure` script is not going to work on Windows out of
> the box because libsnd uses GNU autotools which is for made for UNIX
> like operating systems. You should try and figure out how (if it's
> even possible) to build libsnd on Windows. At glance at the GitHub
> page shows they have a CMake build system but the docs say it will
> likely only work on Linux. There are some commits that mention MINGW
> so maybe it might be possible to build using the MSYS environment.
>
> Good Luck.
>



-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] libsndfile in winodws

2017-03-02 Thread aishwarya selvaraj
Hi all ,
I was trying to build my .cpp file in windows in Windows platform (windows
10) using cmake .
My .cpp file makes use of two external libraries 1)armadillo 2)libsnd file.
I have written a corresponding cmakelist.txt to compile and obtain the
binary .
I was successful in doing so in Linux , when it come to Windows I obtain
the following error .

















*3>Time Elapsed 00:00:02.062> Current branch master is up to
date.2> No patch step for 'project_libsndfile'2> Performing
autogen step for 'project_libsndfile'2> Performing configure step
for 'project_libsndfile'2>
'C:\Users\computing7\Desktop\TSM_cmake\build\lib\libsndfile\src\project_libsndfile\configure'
is not recognized as an internal or external command,2> operable
program or batch file.2> 1>2>C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5):
error MSB6006: "cmd.exe" exited with code 9009.2>   Done executing task
"CustomBuild" -- FAILED.2> 1>2>Done building target "CustomBuild" in
project "project_libsndfile.vcxproj" -- FAILED.2>2>Build FAILED.*
PFA of the cmakelist.txt in case for clarifications.
Why does this error come ?
Is it possible to compile and build libsndfile in windows successfully ?


-- 
Regards,
Aishwarya Selvaraj
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TSM2)


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_library
  CONFIGURE_COMMAND ""
#--Build step-
  BUILD_COMMAND ""
#--Install step---
  UPDATE_COMMAND "" # Skip annoying updates for every build
  INSTALL_COMMAND ""
 )
include_directories(${CMAKE_CURRENT_BINARY_DIR}/armadillo_library/src/armadillo/include)



include(ExternalProject)
MESSAGE(STATUS "Trying to install libsndfile...")

ExternalProject_Add(project_libsndfile
GIT_REPOSITORY https://github.com/erikd/libsndfile.git
PREFIX  lib/libsndfile
CONFIGURE_COMMAND   /configure
BUILD_COMMAND   make
BUILD_IN_SOURCE 1
INSTALL_COMMAND echo Skipping install step for libsndfile
)



ExternalProject_Add_Step(project_libsndfile autogen
   COMMAND  /autogen.sh
   DEPENDEESupdate
   DEPENDERSconfigure
)

ExternalProject_Get_Property(project_libsndfile BINARY_DIR)
SET(libsndfile_lib_dir "${BINARY_DIR}/src/.libs")
SET(libsndfile_inc_dir "${BINARY_DIR}/src")


ADD_LIBRARY(libsndfile STATIC IMPORTED)
SET_PROPERTY(TARGET libsndfile PROPERTY IMPORTED_LOCATION 
${libsndfile_lib_dir}/libsndfile.a)

SET(LIBSNDFILE_INCLUDE_PATH "${install_dir}/src/project_libsndfile-build/src/")

INCLUDE_DIRECTORIES(include ${libsndfile_inc_dir})



ADD_EXECUTABLE(tsm ${PROJECT_SOURCE_DIR}/src/TSM_CODE_V3.cpp)
TARGET_LINK_LIBRARIES(tsm ${ARMADILLO} libsndfile )




-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] cmake in windows

2017-02-20 Thread aishwarya selvaraj
Hi ,
I wanted to obtain binary file for the .cpp code I have written .
My .cpp make use of two external library
1) libsndfile
2) armadillo

I wrote cmakelists .using external project and other command to build and
obtain the binary file .
I was successfull in doing so .

Now I want to try the similiar operation in Windows .
I have never worked on cmake platform in windows .Can anyone guide me upon
it , specifying even its pre requirements .


Thank you .

-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] To include external libraries using Cmake

2017-01-05 Thread aishwarya selvaraj
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:ARMADILLOlinked by target
"tsm" in directory /home/computing9/TSM_cmakeSNDFILElinked 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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] To include external libraries using Cmake

2017-01-04 Thread aishwarya selvaraj
Hi ,
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 .
I use :
Linux -14.04
Cmake - 2.8.12

My .cpp code is called TSM_CODE_V3.cpp.It <http://tsm_code_v3.cpp.it/> depends
on two external library files .1) armadillo 2) sndfile .
I scripted a CmakeLists.txt as follows :

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
PROJECT(TSM2)

FIND_LIBRARY(ARMADILLO armadillo)
MESSAGE(STATUS "Armadillo Library location: " ${ARMADILLO})

IF (NOT ARMADILLO_FOUND)
include(ExternalProject)
MESSAGE(STATUS "Armadillo not found in the system ,Trying to install
armadillo...")
ExternalProject_Add(armadillo
  URL https://github.com/lsolanka/armadillo/archive/master.zip
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-latest)
ENDIF()

FIND_LIBRARY(SNDFILE sndfile)
MESSAGE(STATUS "Sndfile Library location: " ${SNDFILE})

IF (NOT SNDFILE_FOUND)
include(ExternalProject)
MESSAGE(STATUS "Armadillo not found in the system ,Trying to install
libsndfile...")
ExternalProject_Add(sndfile
  URL https://github.com/erikd/libsndfile/archive/master.zip
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/sndfile-latest)
ENDIF()

ADD_EXECUTABLE(tsm ${PROJECT_SOURCE_DIR}/src/TSM_CODE_V3.cpp)
TARGET_LINK_LIBRARIES(tsm ${ARMADILLO} ${SNDFILE})


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 .


I'm not  sure where am I going wrong here .
Can anyone help me out ?

Hoping to hear from you..

-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Cmake

2016-12-21 Thread aishwarya selvaraj
Hi Everyone,
Myself Aishwarya .I wanted to make use of Cmake , but I'm really new to
this and doesn't have a clear idea about it.

1) *My Goal :*
I'm using Praat a speech Processing Software to create plug - in for my
Algorithm on Pitch and Time scaling .(I have the .cpp file)
In order to do that I need to use the binary file obtained by compiling
.cpp file
​in my Praat Script .
I intent to share this plug - in with others ,Hence I want it to be machine
independent .The binary file I obtained is using gcc in Linux (16.0.2),
which clearly wont work in Mac or Windows or even in lower Linux Version.
To solve this Problem I understand that I need to make use of Cmake files .

2) My .cpp file called TSM_CODE_V3.cpp is compiled as
g++ TSM_CODE_V3.cpp -larmadillo -lsndfile -o TSM

where armadillo and sndfile are two depended libraries.

3)* What I have done :*
​I have gone through a loot of tutorials for cmake .I have wage idea , but
I'm not able to solve my problem mentioned above .
​My folder TSM consists of
build - the folder which consists the final executable binary file and the
related cmake files required to create binary file
src - consists of my TSM_CODE_V3.cpp code
CMakeLists.txt - The top level Cmake file :

 cmake_minimum_required(VERSION 2.8.9)
 project(directory_TSM)
 include_directories(include)
 file(GLOB SOURCES "src/*.cpp")
 add_executable(tsm ${SOURCES})


I need to include the library armadillo and lidsndfile .
I dont know how to include it into my cmakefile .
I have come across find_package ,find_library  but I am sure about it .
 To create my Praat Plug - in I need to compile the source code no matter
in which system it is ,which may or may not have these two libraries
already installed.
So how how do I add libraries using cmake ?
I hope you got my point .
Could help me ?


Hoping for your reply .

-- 
Regards,
Aishwarya Selvaraj
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake