[CMake] ExternalProject_Add : set the location of CMakeLists.txt
Benjamin Ballet
bballet at ivsweb.com
Wed Oct 26 05:34:23 EDT 2016
Ok I'm quiet lucky : There is what I need in CMake 3.7 (SOURCE_SUBDIR)
2016-10-25 19:54 GMT+02:00 Konstantin Podsvirov <konstantin at podsvirov.pro>:
> Hello again.
>
> 25.10.2016, 20:31, "Konstantin Podsvirov" <konstantin at podsvirov.pro>:
> > Hello, Benjamin.
> >
> > 25.10.2016, 19:41, "Benjamin Ballet via CMake" <cmake at cmake.org>:
> >> Hi,
> >>
> >> I'm trying to get GLEW (https://github.com/nigels-com/glew) with
> ExternalProject_Add
> >> It's buildable with cmake but the CMakeLists.txt is in build/cmake
> directory.
> >>
> >> Is there a way to specify the directory of the CMakeLists.txt file ?
> >>
> >> If I change SOURCE_DIR it will only clone the repo in SOURCE_DIR and
> still run the cmake command in repo root.
> >>
> >> --
> >> Benjamin BALLET
> >> Ingénieur R&D
> >>
> >> ACTIVISU
> >> 19, rue Klock - 92110 Clichy
> >>> Standard Tél : 01 44 69 37 37
> >>> www.activisu.com
> >> ,--
> >
> > Try it:
> >
> > ExternalProject_Add(
> > ...
> > SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/source
> > ...
> > CONFIGURE_COMMAND ${CMAKE_COMMAND} [additional args...]
> ${CMAKE_CURRENT_BINARY_DIR}/source/build/cmake
> > ...)
>
>
> Or try it:
>
> ExternalProject_Add(
> ...
> SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/source
> ...
> CONFIGURE_COMMAND ${CMAKE_COMMAND} [additional args...]
> -DCMAKE_GENERATOR=${CMAKE_GENERATOR}
> -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
> -DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET}
> ${CMAKE_CURRENT_BINARY_DIR}/source/build/cmake
> ...)
>
> --
> Regards,
> Konstantin Podsvirov
>
--
*Benjamin BALLET*
Ingénieur R&D
*ACTIVISU*
19, rue Klock - 92110 Clichy
*> Standard Tél* : 01 44 69 37 37
*>* www.activisu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161026/7bc25b18/attachment.html>
More information about the CMake
mailing list