<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>I got the problem solved again, but now i'm stuck... now i've the
      following:</p>
    <p><br>
    </p>
    <p>add_library(glad STATIC IMPORTED)<br>
      set_target_properties(glad PROPERTIES IMPORTED_LOCATION
      ${LIB_DIR}/glad/lib/libglad.a)<br>
      <br>
      add_library(glfw3 STATIC IMPORTED)<br>
      set_target_properties(glfw3 PROPERTIES IMPORTED_LOCATION
      ${LIB_DIR}/glew/lib/libglfw3.a)<br>
      <br>
      <br>
      add_executable(Test01 source/test/Test01.cpp)<br>
      target_link_libraries(Test01 PRIVATE glad glfw3)<br>
      <br>
    </p>
    <p>But now he can't find the header files which are also created
      after the configuration, how to solve this problem ??</p>
    <p>I hope you see i put much effort in this and find most of the
      problems alone, i hope this time someone can help me out.</p>
    <p><br>
    </p>
    <p>best regards!<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 10.03.19 12:38, <a class="moz-txt-link-abbreviated" href="mailto:Workbench@gmx.at">Workbench@gmx.at</a>
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:19a778dd-d3b5-a85a-3994-4ef5b3e0aee9@gmx.at">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>I came a step forward, now it looks like this:</p>
      <p>include(ExternalProject)<br>
        ExternalProject_Add(glfw3<br>
            PREFIX ${CMAKE_BINARY_DIR}/glfw-log<br>
            GIT_REPOSITORY <a class="moz-txt-link-freetext"
          href="https://github.com/glfw/glfw.git" moz-do-not-send="true">https://github.com/glfw/glfw.git</a><br>
            GIT_TAG 3.2.1<br>
            SOURCE_DIR ${CMAKE_BINARY_DIR}/glfw<br>
            UPDATE_COMMAND ""<br>
            PATCH_COMMAND ""<br>
            INSTALL_DIR ${CMAKE_BINARY_DIR}/glfw<br>
            CMAKE_ARGS -DCMAKE_BUILD_TYPE:String={CMAKE_BUILD_TYPE}
        -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glfw<br>
        )<br>
        <br>
        ExternalProject_Add(glad<br>
            PREFIX ${CMAKE_BINARY_DIR}/glad-log<br>
            GIT_REPOSITORY <a class="moz-txt-link-freetext"
          href="https://github.com/Dav1dde/glad.git"
          moz-do-not-send="true">https://github.com/Dav1dde/glad.git</a><br>
            GIT_TAG v0.1.29<br>
            SOURCE_DIR ${CMAKE_BINARY_DIR}/glad<br>
            UPDATE_COMMAND ""<br>
            PATCH_COMMAND ""<br>
            INSTALL_DIR ${CMAKE_BINARY_DIR}/glad<br>
            CMAKE_ARGS -DCMAKE_BUILD_TYPE:String=${CMAKE_BUILD_TYPE}
        -DCMAKE_INSTALL_PREFIX=${LIB_DIR}/glad -DGLAD_EXPORT=True
        -DGLAD_INSTALL=True<br>
            CONFIGURE_COMMAND ${CMAKE_BUILD_DIR}/<br>
            INSTALL_COMMAND <br>
                COMMAND ${CMAKE_COMMAND} -E copy
        ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/libglad.a
        ${LIB_DIR}/glad/lib/libglad.a <br>
                COMMAND ${CMAKE_COMMAND} -E copy_directory
        ${CMAKE_BINARY_DIR}/glad-log/src/glad-build/include
        ${LIB_DIR}/glad/<br>
        )<br>
        find_package(glad REQUIRED)<br>
        find_package(glfw3 REQUIRED)<br>
        add_executable(Test01 source/test/Test01.cpp)<br>
        target_link_libraries(Test01 PRIVATE glad glfw3)<br>
      </p>
      <p>But now i've the following problem, i get the error message:</p>
      <p>CMake Error at CMakeLists.txt:95 (find_package):<br>
          By not providing "Findglad.cmake" in CMAKE_MODULE_PATH this
        project has<br>
          asked CMake to find a package configuration file provided by
        "glad", but<br>
          CMake did not find one.<br>
        <br>
          Could not find a package configuration file provided by "glad"
        with any of<br>
          the following names:<br>
        <br>
            gladConfig.cmake<br>
            glad-config.cmake<br>
        <br>
          Add the installation prefix of "glad" to CMAKE_PREFIX_PATH or
        set<br>
          "glad_DIR" to a directory containing one of the above files. 
        If "glad"<br>
          provides a separate development package or SDK, be sure it has
        been<br>
          installed.<br>
      </p>
      <p>The problem is gladConfig.cmake is created after the configure
        procedure, how can i solve this issue ??</p>
      <p><br>
      </p>
      <p>best regards!</p>
      <p><br>
      </p>
      <p><br>
      </p>
      <p><br>
      </p>
      <div class="moz-cite-prefix">On 10.03.19 11:44, <a
          class="moz-txt-link-abbreviated"
          href="mailto:Workbench@gmx.at" moz-do-not-send="true">Workbench@gmx.at</a>
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:a5d21e79-753f-1eff-0378-3ad19f7d7b31@gmx.at">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <p>Now i've managed to create the right INSTALL_COMMAND but i
          don't know how to link with my executable. i tried <br>
        </p>
        <p>add_executable(MyApp ${src})</p>
        <p>target_link_libraries(MyApp STATIC GLFW GLAD)</p>
        <p>and i get the following error message:</p>
        <p>CMake Error at CMakeLists.txt:96 (target_link_libraries):<br>
            Target "LIBGLAD" of type UTILITY may not be linked into
          another target.<br>
            One may link only to INTERFACE, OBJECT, STATIC or SHARED
          libraries, or to<br>
            executables with the ENABLE_EXPORTS property set.<br>
          <br>
          <br>
          CMake Error at CMakeLists.txt:96 (target_link_libraries):<br>
            Target "LIBGLFW" of type UTILITY may not be linked into
          another target.<br>
            One may link only to INTERFACE, OBJECT, STATIC or SHARED
          libraries, or to<br>
            executables with the ENABLE_EXPORTS property set.<br>
          <br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p>target_link_libraries(M<br>
        </p>
        <div class="moz-cite-prefix">On 10.03.19 10:40, <a
            class="moz-txt-link-abbreviated"
            href="mailto:Workbench@gmx.at" moz-do-not-send="true">Workbench@gmx.at</a>
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:96080f63-d03d-68f8-d204-ddf91a99e344@gmx.at">
          <pre class="moz-quote-pre" wrap="">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 <a class="moz-txt-link-freetext" href="https://github.com/glfw/glfw.git" moz-do-not-send="true">https://github.com/glfw/glfw.git</a>
    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 <a class="moz-txt-link-freetext" href="https://github.com/Dav1dde/glad.git" moz-do-not-send="true">https://github.com/Dav1dde/glad.git</a>
    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!

</pre>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
        </blockquote>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
    </blockquote>
  </body>
</html>