<div dir="ltr">oh, that was it a typo!<div><br></div><div>A few more questions. I build the project like this:</div><div><div>ExternalProject_Add(sdl</div><div>    HG_REPOSITORY <a href="http://hg.libsdl.org/SDL">http://hg.libsdl.org/SDL</a></div><div>    UPDATE_COMMAND ""</div><div><br></div><div>    CMAKE_ARGS -DSDL_STATIC:BOOL=FALSE</div><div>    -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/lib</div><div><br></div><div>    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL</div><div><br></div><div>    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin</div><div>    )</div><div><br></div></div><div>That seems to build everything and put everything in the right place. Another thing that I did with other parts of my code was add these lines to the end of the cmakelists.txt files</div><div><br></div><div><div>TARGET_INCLUDE_DIRECTORIES(mylib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/headers)<br></div></div><div><br></div><div>so that I can just #include "mylib" instead of the path to the file. With this setup, I can't do target_include_directories from the external_project_add command, how do I get those headers?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 6:26 PM, Nicholas Braden <span dir="ltr"><<a href="mailto:nicholas11braden@gmail.com" target="_blank">nicholas11braden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What's the word "clone" doing in there? That should be a URL, not<br>
command parameters.<br>
<div><div class="h5"><br>
On Tue, Dec 15, 2015 at 2:01 AM, Owen Hogarth II <<a href="mailto:gurenchan@gmail.com">gurenchan@gmail.com</a>> wrote:<br>
> I have been reading this:<br>
> <a href="https://cmake.org/cmake/help/v3.0/module/ExternalProject.html" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.0/module/ExternalProject.html</a><br>
><br>
> trying to add sdl external project but I am  having issues. I created a new<br>
> cmake project to test.<br>
><br>
> I already downloaded the sdl library and can build it correctly by manually<br>
> calling cmake commands but this is how I'd like to distribute sdl w/ my<br>
> library.<br>
><br>
> here's my new test cmake:<br>
><br>
> cmake_minimum_required(VERSION2.8)<br>
> project(sdl_external)<br>
><br>
> include(ExternalProject)<br>
><br>
> ExternalProject_Add(sdl<br>
>     HG_REPOSITORY clone <a href="http://hg.libsdl.org/SDL" rel="noreferrer" target="_blank">http://hg.libsdl.org/SDL</a><br>
>     # PREFIX ${CMAKE_SOURCE_DIR}/sdl<br>
><br>
>     # SOURCE_DIR ${CMAKE_SOURCE_DIR}/sdl<br>
><br>
>     # INSTALL_COMMAND cmake ../ PREFIX=${CMAKE_CURRENT_BINARY_DIR}<br>
>     )<br>
><br>
> I get this build output:<br>
> cmake ../<br>
> -- The C compiler identification is GNU 4.9.2<br>
> -- The CXX compiler identification is GNU 4.9.2<br>
> -- Check for working C compiler: /usr/bin/cc<br>
> -- Check for working C compiler: /usr/bin/cc -- works<br>
> -- Detecting C compiler ABI info<br>
> -- Detecting C compiler ABI info - done<br>
> -- Check for working CXX compiler: /usr/bin/c++<br>
> -- Check for working CXX compiler: /usr/bin/c++ -- works<br>
> -- Detecting CXX compiler ABI info<br>
> -- Detecting CXX compiler ABI info - done<br>
> -- Found Hg: /usr/bin/hg (found version "3.1.2")<br>
> -- Configuring done<br>
> -- Generating done<br>
> -- Build files have been written to: /home/blubee/sdk/test/build<br>
> Scanning dependencies of target sdl<br>
> [ 12%] Creating directories for 'sdl'<br>
> [ 25%] Performing download step (hg clone) for 'sdl'<br>
> -- Avoiding repeated hg clone, stamp file is up to date:<br>
> '/home/blubee/sdk/_b/build/test/<br>
> build/sdl-prefix/src/sdl-stamp/sdl-hginfo.txt'<br>
> [ 37%] No patch step for 'sdl'<br>
> [ 50%] Performing update step (hg pull) for 'sdl'<br>
> abort: no repository found in '<br>
> /home/blubee/sdk/test/build/sdl-prefix/src/sdl' (<br>
> .hg not found)!<br>
> CMakeFiles/sdl.dir/build.make:89: recipe for target<br>
> 'sdl-prefix/src/sdl-stamp/sdl-update'<br>
>  failed<br>
> make[2]: *** [sdl-prefix/src/sdl-stamp/sdl-update] Error 255<br>
> CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/sdl.dir/all' failed<br>
> make[1]: *** [CMakeFiles/sdl.dir/all] Error 2<br>
> Makefile:76: recipe for target 'all' failed<br>
> make: *** [all] Error 2<br>
><br>
> my external build file isn't very verbose but I don't get the error<br>
><br>
> why is it reporting that no repository found.<br>
> abort: no repository found in<br>
> '/home/blubee/sdk/test/build/sdl-prefix/src/sdl' (<br>
> .hg not found)!<br>
><br>
> Why isn't the mercurial project not being downloaded?<br>
><br>
</div></div>> --<br>
><br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>