cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Some fixes for cmake build.

From: Yang Tse <yangsita_at_gmail.com>
Date: Mon, 29 Mar 2010 03:28:19 +0200

2010/3/28, Tetetest wrote:

> After some investigation I discovered the following:
> 1. CMake build uses 'curlbuild.h' file that comes with the
> distribution. This means that, in essence, curl build is just the
> same as non-configure builds.

CMake build scripts will need to be adjusted to overwrite distributed
curlbuild.h, otherwise CMake builds might be a do-nothing as you have
discovered.

> So I fixed the cmake build so that it generates a correct curlbuild.h.
> I also had to fix "curl/curl.h" file, because its original way of
> including "curlbuild.h" does not work with out-of-source build
> which is used by cmake.

> diff -Naur curl-7.20.0-old/include/curl/curl.h curl-7.20.0/include/curl/curl.h
> --- curl-7.20.0-old/include/curl/curl.h 2010-03-27 15:26:15.703125000 +0300
> +++ curl-7.20.0/include/curl/curl.h 2010-03-28 00:45:52.531250000 +0300
> @@ -32,7 +32,7 @@
> */
>
> #include "curlver.h" /* libcurl version defines */
> -#include "curlbuild.h" /* libcurl build definitions */
> +#include <curl/curlbuild.h> /* libcurl build definitions */
> #include "curlrules.h" /* libcurl rules enforcement */

That change is not acceptable. Some few libcurl versions were released
with an include line for curlbuild.h like the one that you propose
now. Due to the problem it represented for some platforms it was fixed
back to a 'traditional' include which did not have the leading 'curl'
path and makefiles for configure and non-configure systems adjusted
accordingly.

So, CMake build scripts will need to be adjusted to be able to use
curl.h 'as is', it is the responsibility of CMake scripts to generate
appropriate makefiles which define the proper include paths.

-- 
-=[Yang]=-
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-29