[CMake] using ExternalProject_Add when cmake is launched

Kai Wolf kai.wolf at gmail.com
Wed May 2 03:32:34 EDT 2018


You probably need to manually add a dependency from your ExternalProject to
your target that needs the libraries.
For instance

    ExternalProject_Add(fetch_win32_libs ...)
    add_library(your_other_target ...)
    add_dependencies(your_other_target fetch_win32_libs)

Greetings

Kai Wolf

http://kai-wolf.me/
kai.wolf at gmail.com

2018-05-02 8:47 GMT+02:00 Stéphane Ancelot <sancelot at numalliance.com>:

> Hi,
>
> I have got some win32 libraries dependencies stored in a project .
>
> Then I added ExternalProject_Add at beginning of my cmakelists file in
> order to clone this dependency to be available.
>
> and then provide the root path as follow:
>
> SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc
> ${CMAKE_CURRENT_SOURCE_DIR}/WIN32DEPS/JPEGLIB/jpegsrc-9c
> ${CMAKE_CURRENT_SOURCE_DIR}/WIN32DEPS/zlib-1.2.3-lib
> ${CMAKE_CURRENT_SOURCE_DIR}/WIN32DEPS/libpng-1.2.37-lib
> ${CMAKE_CURRENT_SOURCE_DIR}/WIN32DEPS/ftgl-binary
> ${CMAKE_CURRENT_SOURCE_DIR}/WIN32DEPS/freetype-dev_2.4.2-1
> ${CMAKE_CURRENT_SOURCE_DIR}/WIN32DEPS/iconv-1.9.2.1
>                         )
>
>
> unfortunately, the project is not cloned when cmake is launched and the
> next dependencies don't find the packages :-(
>
> What Can I do ?
>
> Regards,
>
> S.Ancelot
> --
>
> 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/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180502/5dd23f82/attachment.html>


More information about the CMake mailing list