Questin about ExternalProject_Add

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Questin about ExternalProject_Add

Steven Truppe
Hi everyone,

i'm trying to create a build system that download all needed libraries
with ExternalProject_Add.

i've the following lines in my CMakeLists.txt:

option(WITH_LIB_GLFW "Support for the GLFW library. (default: 1)" 1)
option(WITH_LIB_NLOHMANN_JSON "Support for the nlohmann JSON library.
(default: 1)" 1)
option(WITH_LIB_ZLIB "Support for the zlib library. (default: 1)" 1)
option(WITH_LIB_ZLMA "Support for the zlma library. (default: 1)" 1)
option(WITH_LIB_FLEX "Support for the flex library. (default: 1)" 1)
option(WITH_LIB_OPENSSL "Support for the OpenSSL library. (default: 1)" 1)
option(WITH_LIB_BZIP2 "Support for the bzip2 library. (default: 1)" 1)
option(WITH_LIB_FREETYPE "Support for the freetype library (default: 1)" 1)
option(WITH_LIB_STB_IMAGE "Support for  JPG, PNG, TGA, BMP, PSD, GIF,
HDR, PIC" 1)
option(WITH_LIB_STB_IMAGE_WRITE "Support to write PNG, TGA and BMP" 1)
option(WITH_LIB_PYTHON "Support for Python embeding" 1)
option(WITH_LIB_BOOST "Support for the boost C++ library" 1)

and later in that file i have:

IF(WITH_LIB_GLFW)
     message(STATUS "WITH_LIB_GLAD")
     include(glad_def)
     include(glad_deps)
     message(STATUS "WITH_LIB_GLFW")
     include(glfw_def)
     include(glfw_deps)
ENDIF()

IF(WITH_LIB_NLOHMANN_JSON)
     message(STATUS "WITH_LIB_NLOHMANN_JSON")
     include(nlohmann_json_def)
     include(nlohmann_json_deps)
ENDIF()

IF(WITH_LIB_STB_IMAGE)
     message(STATUS "WITH_LIB_STB_IMAGE")
     include(stb_image_deps)
ENDIF()

IF(WITH_LIB_STB_IMAGE_WRITE)
     message(STATUS "WITH_LIB_STB_IMAGE_WRITE")
     include(stb_image_write_deps)
ENDIF()


IF(WITH_LIB_FTGL)
     message(STATUS "WITH_LIB_FTGL")
     #    include(ftgl_defs)
     include(ftgl_deps)
ENDIF()


IF(WITH_LIB_ZLIB)
     message(STATUS "WITH_LIB_ZLIB")
     include(zlib_deps)
ENDIF()

IF(WITH_LIB_FLEX)
     message(STATUS "WITH_LIB_FLEX")
     include(flex_deps)
ENDIF()

IF(WITH_LIB_BISON)
     message(STATUS "WITH_LIB_BISON")
     include(bison_deps)
ENDIF()

IF(WITH_LIB_BZIP2)
     message(STATUS "WITH_LIB_BZIP2")
     include(bzip2_deps)
ENDIF()


IF(WITH_LIB_ZLMA)
     message(STATUS "WITH_LIB_ZLMA")
     include(zlma_deps)
ENDIF()


IF(WITH_LIB_OPENSSL)
     message(STATUS "WITH_LIB_OPENSSL")
     include(openssl_deps)
ENDIF()

IF(WITH_LIB_GETTEXT)
     message(STATUS "WITH_LIB_GETTEXT")
     include(gettext_deps)
ENDIF()

IF(WITH_LIB_FREETYPE)
     message(STATUS "WITH_LIB_FREETYPE")
     include(freetype_deps)
ENDIF()

IF(WITH_LIB_PYTHON)
     message(STATUS "WITH_LIB_PYTHON")
     include(python_defs)
     include(python_deps)
ENDIF()

IF(WITH_LIB_BOOST)
     message(STATUS "WITH_LIB_BOOST")
     include(boost_deps)
ENDIF()

The strange thing is that he does not does it in the right order - he
start's with WITH_LIB_BOOST instead of WITH_LIB_GLFW.


What am i doing wrong here ??


best regards!

--

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:
https://cmake.org/mailman/listinfo/cmake