[CMake] adding external project

Nicholas Braden nicholas11braden at gmail.com
Tue Dec 15 05:26:53 EST 2015


What's the word "clone" doing in there? That should be a URL, not
command parameters.

On Tue, Dec 15, 2015 at 2:01 AM, Owen Hogarth II <gurenchan at gmail.com> wrote:
> I have been reading this:
> https://cmake.org/cmake/help/v3.0/module/ExternalProject.html
>
> trying to add sdl external project but I am  having issues. I created a new
> cmake project to test.
>
> I already downloaded the sdl library and can build it correctly by manually
> calling cmake commands but this is how I'd like to distribute sdl w/ my
> library.
>
> here's my new test cmake:
>
> cmake_minimum_required(VERSION2.8)
> project(sdl_external)
>
> include(ExternalProject)
>
> ExternalProject_Add(sdl
>     HG_REPOSITORY clone http://hg.libsdl.org/SDL
>     # PREFIX ${CMAKE_SOURCE_DIR}/sdl
>
>     # SOURCE_DIR ${CMAKE_SOURCE_DIR}/sdl
>
>     # INSTALL_COMMAND cmake ../ PREFIX=${CMAKE_CURRENT_BINARY_DIR}
>     )
>
> I get this build output:
> cmake ../
> -- The C compiler identification is GNU 4.9.2
> -- The CXX compiler identification is GNU 4.9.2
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Found Hg: /usr/bin/hg (found version "3.1.2")
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/blubee/sdk/test/build
> Scanning dependencies of target sdl
> [ 12%] Creating directories for 'sdl'
> [ 25%] Performing download step (hg clone) for 'sdl'
> -- Avoiding repeated hg clone, stamp file is up to date:
> '/home/blubee/sdk/_b/build/test/
> build/sdl-prefix/src/sdl-stamp/sdl-hginfo.txt'
> [ 37%] No patch step for 'sdl'
> [ 50%] Performing update step (hg pull) for 'sdl'
> abort: no repository found in '
> /home/blubee/sdk/test/build/sdl-prefix/src/sdl' (
> .hg not found)!
> CMakeFiles/sdl.dir/build.make:89: recipe for target
> 'sdl-prefix/src/sdl-stamp/sdl-update'
>  failed
> make[2]: *** [sdl-prefix/src/sdl-stamp/sdl-update] Error 255
> CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/sdl.dir/all' failed
> make[1]: *** [CMakeFiles/sdl.dir/all] Error 2
> Makefile:76: recipe for target 'all' failed
> make: *** [all] Error 2
>
> my external build file isn't very verbose but I don't get the error
>
> why is it reporting that no repository found.
> abort: no repository found in
> '/home/blubee/sdk/test/build/sdl-prefix/src/sdl' (
> .hg not found)!
>
> Why isn't the mercurial project not being downloaded?
>
> --
>
> 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


More information about the CMake mailing list