cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Call for libcurl cmake users/maintainers!

From: Geoff Beier <geoff_at_redhoundsoftware.com>
Date: Fri, 25 Jul 2014 09:08:25 -0400

On Thu, Jul 24, 2014 at 6:09 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 24 Jul 2014, Geoff Beier wrote:
>
> FWIW, we use the cmake build system exclusively for libcurl on Windows.
>>
>
> How come you do that? Is there any other reason beside you just picked it
> once and it worked?
>
>
We use cmake quite a bit for internal projects. The way our build system
works, we compile and install each dependency with appropriate settings
into a per-product sandbox on disk. So for an autotools build, we might use

../configure --prefix=/home/geoff/stage/curl --enable-foo --disable-bar &&
make -j8 && make install

CMake with CMAKE_INSTALL_PREFIX set and CMAKE_PREFIX_PATH set makes it very
easy to work that way on windows also. Our build process is essentially:

cmake -G "Visual Studio 10 Win64"
-DCMAKE_INSTALL_PREFIX:PATH="E:\stage\curl"
-DBUILD_RELEASE_DEBUG_DIRS:BOOLEAN=1 ..
msbuild INSTALL.vcxproj -p:Configuration=Release

Being able to do that makes it really trivial for me to include curl in any
project I've got. (Mac, Linux, Windows, Android, iPhone)

Obviously I could script up some other option on windows to have the
libraries and headers land where my other projects expect them to, but with
cmake it just happens, so I tend to use it if I see CMakeLists.txt in a
source tarball.

On other platforms, for curl, I knew the autotools builds were easier to
control than cmake. On Windows, I never had the impression that other build
options were any better, and using cmake made life easier.

(I hope that clarifies why we like it.)

Geoff

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-25