[CMake] libsndfile in winodws
Dan Liew
dan at su-root.co.uk
Thu Mar 2 07:38:23 EST 2017
On 2 March 2017 at 12:07, aishwarya selvaraj
<aishwaryaselvaraj1708 at 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 <SOURCE_DIR>/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.
More information about the CMake
mailing list