[CMake] Question about INSTALL_COMMAND for ExternalProject_Add()

Workbench@gmx.at workbench at gmx.at
Sun Mar 10 05:40:49 EDT 2019


Hi everyone,

i've managed to use ExternalProject_Add to install GLFW but i have
troubles with glad...

Here is my code for GLFW wich is working:

include(ExternalProject)
ExternalProject_Add(GLFW
    PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glfw-log
    GIT_REPOSITORY https://github.com/glfw/glfw.git
    GIT_TAG 3.2.1
    SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw
    UPDATE_COMMAND ""
    PATCH_COMMAND ""
    INSTALL_DIR ${LIBDIR}/glfw
    CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw
)

Now i tried the same with GLAD but i had to add INSTALL_COMMAND to make
it work but i've no clue what i should enter there to install it the
same way i did with glfw..

ExternalProject_Add(GLAD
    PREFIX ${LIBDIR}/${CMAKE_BUILD_TYPE}/glad-log
    GIT_REPOSITORY https://github.com/Dav1dde/glad.git
    GIT_TAG v0.1.29
    SOURCE_DIR ${CMAKE_BINARY_DIR}/glad
    UPDATE_COMMAND ""
    PATCH_COMMAND ""
    INSTALL_DIR ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/glad
    CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad
    INSTALL_COMMAND "??"
)


I hope someone can help me, i'm a bit clueless about this.


best regards!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 2452 bytes
Desc: not available
URL: <https://cmake.org/pipermail/cmake/attachments/20190310/cfd875e2/attachment.key>


More information about the CMake mailing list