cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3494982 ] CMake fails with sources from github

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sun, 04 Mar 2012 15:16:00 -0800

Bugs item #3494982, was opened at 2012-02-27 04:12
Message generated for change (Comment added) made by theret
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3494982&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: compile or build problem
Group: wrong behaviour
>Status: Open
Resolution: Invalid
Priority: 5
Private: No
Submitted By: theret (theret)
Assigned to: Daniel Stenberg (bagder)
Summary: CMake fails with sources from github

Initial Comment:
OS: any
CMake: any
cURL: current development sources from github

CMake fails with:

CMake Error at src/CMakeLists.txt:18 (add_executable):
  Cannot find source file:

    config-win32.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

The failing line is:

${CMAKE_SOURCE_DIR}/src/CMakeLists.txt:18:
add_executable(
  ${EXE_NAME}
  ${curl_SOURCES}
  )

curl_SOURCES is defined in ${CMAKE_BINARY_DIR}/src/Makefile.inc.cmake:
SET(CURL_HFILES hugehelp.h setup.h config-win32.h config-mac.h [...]
SET(curl_SOURCES ${CURL_CFILES} ${CURLX_ONES} ${CURL_HFILES})

The problem is that add_executable() needs the full path to all source files outside the current dir. But config-win32.h is in ${CMAKE_SOURCE_DIR}/lib not in the current dir (src).

Solution:

Set the full path ${CMAKE_SOURCE_DIR}/lib/config-win32.h in Makefile.inc.cmake, e.g.:

SET(CURL_HFILES hugehelp.h setup.h ${CMAKE_SOURCE_DIR}/lib/config-win32.h config-mac.h [...]

----------------------------------------------------------------------

>Comment By: theret (theret)
Date: 2012-03-04 15:16

Message:
1. OK, I looked at GIT-INFO but the scripts mentioned therein are not
relevant for cmake. They are autotools related. I don't have autotools
(e.g. windows) and hence want to build curl with cmake. So what do I have
to do exactly before I can do that? Which script does the "massaging"?

2. As a sidenote: people who use cmake for building are potentially unable
to run shell scripts to do the massaging. so ideally curl should take care
of creating necessary support files itself with cmake scripts.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2012-03-04 14:35

Message:
Yes, you need a script to "massage" it after a git checkout, as is detailed
in the GIT-INFO file.

There's also scripts run when the tarballs are made so we should make sure
what you need isn't made only then.

----------------------------------------------------------------------

Comment By: theret (theret)
Date: 2012-03-02 17:26

Message:
I can confirm it works with the daily tarball. Do you apply a certain
script to do the "massaging"? Is there a way for me to reproduce that?

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2012-02-27 14:34

Message:
Have you tried one of the daily tarballs instead of the git repository? The
git repo needs some massaging of files to make it ready for building, and
IIRC some of the config files are copied during the massaging that happens.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3494982&group_id=976
Received on 2012-03-05

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET