ExternalProject_Add

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ExternalProject_Add

Saad Khattak
Hello,

I have an external project glfw that I added to my project like this:

==========
include(ExternalProject)
ExternalProject_Add(glfw
  GIT_TAG "master"

  SOURCE_DIR "${CMAKE_SOURCE_DIR}/dep/glfw"
  CMAKE_ARGS -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/install/glfw/ -DCMAKE_DEBUG_POSTFIX=_d

  TEST_COMMAND ""
  )
set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/install/glfw/include/")
set(GLFW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/install/glfw/lib/")
========== 
 
Then I include it in my project like so:

==========  
find_library(GLFW_LIB_D  glfw3_d ${GLFW_LIBRARY_DIR})
find_library(GLFW_LIB    glfw3   ${GLFW_LIBRARY_DIR})

include_directories(${GLFW_INCLUDE_DIR})

add_executable(vk_test
  src/vulkan_test.cpp
  )
target_link_libraries(vk_test debug ${GLFW_LIB_D} optimized ${GLFW_LIB})
add_dependencies(vk_test glfw)
========== 

As you can see, I depend on the libraries compiled by the external project glfw. Unfortunately, when I first configure the project, CMake complains that it cannot find the libraries specified by ${GLFW_LIB_D} and ${GLFW_LIB} variables. 

Of course, this is because CMake did not begin cloning, configuring and building the glfw project. That only happens AFTER my project has been configured and starts building. This becomes a chicken and the egg problem.

Currently, my solution is to add dummy .lib files so that I can at least configure and generate my project. My question is, am I approaching this problem in the wrong way? If yes, what is the correct way to add a dependency to an external project and have it clone/configure/build BEFORE the "find_library" call?


--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ExternalProject_Add

Nicholas Braden
The way to solve this is to use a superbuild project layout - you use ExternalProject_Add to build your dependencies AND your own project, using the DEPENDS option to control build order. Thus by the time it gets around to configuring your project, the dependencies have already been built and installed fully.

On Sun, Jan 8, 2017 at 3:49 PM, Saad Khattak <[hidden email]> wrote:
Hello,

I have an external project glfw that I added to my project like this:

==========
include(ExternalProject)
ExternalProject_Add(glfw
  GIT_TAG "master"

  SOURCE_DIR "${CMAKE_SOURCE_DIR}/dep/glfw"
  CMAKE_ARGS -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/install/glfw/ -DCMAKE_DEBUG_POSTFIX=_d

  TEST_COMMAND ""
  )
set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/install/glfw/include/")
set(GLFW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/install/glfw/lib/")
========== 
 
Then I include it in my project like so:

==========  
find_library(GLFW_LIB_D  glfw3_d ${GLFW_LIBRARY_DIR})
find_library(GLFW_LIB    glfw3   ${GLFW_LIBRARY_DIR})

include_directories(${GLFW_INCLUDE_DIR})

add_executable(vk_test
  src/vulkan_test.cpp
  )
target_link_libraries(vk_test debug ${GLFW_LIB_D} optimized ${GLFW_LIB})
add_dependencies(vk_test glfw)
========== 

As you can see, I depend on the libraries compiled by the external project glfw. Unfortunately, when I first configure the project, CMake complains that it cannot find the libraries specified by ${GLFW_LIB_D} and ${GLFW_LIB} variables. 

Of course, this is because CMake did not begin cloning, configuring and building the glfw project. That only happens AFTER my project has been configured and starts building. This becomes a chicken and the egg problem.

Currently, my solution is to add dummy .lib files so that I can at least configure and generate my project. My question is, am I approaching this problem in the wrong way? If yes, what is the correct way to add a dependency to an external project and have it clone/configure/build BEFORE the "find_library" call?


--

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:
http://public.kitware.com/mailman/listinfo/cmake


--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ExternalProject_Add

Hendrik Sattler
In reply to this post by Saad Khattak
One possibility is the often mentioned superbuild, another is not using find_library() but setting the variables with the library file paths manually (that's static info anyway).


Am 8. Januar 2017 22:49:52 MEZ schrieb Saad Khattak <[hidden email]>:

>Hello,
>
>I have an external project glfw that I added to my project like this:
>
>==========
>include(ExternalProject)
>ExternalProject_Add(glfw
>  GIT_REPOSITORY "https://github.com/glfw/glfw.git"
>  GIT_TAG "master"
>
>  SOURCE_DIR "${CMAKE_SOURCE_DIR}/dep/glfw"
>  CMAKE_ARGS -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_TESTS=OFF
>-DGLFW_BUILD_EXAMPLES=OFF
>-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/install/glfw/
>-DCMAKE_DEBUG_POSTFIX=_d
>
>  TEST_COMMAND ""
>  )
>set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/install/glfw/include/")
>set(GLFW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/install/glfw/lib/")
>==========
>
>Then I include it in my project like so:
>
>==========
>find_library(GLFW_LIB_D  glfw3_d ${GLFW_LIBRARY_DIR})
>find_library(GLFW_LIB    glfw3   ${GLFW_LIBRARY_DIR})
>
>include_directories(${GLFW_INCLUDE_DIR})
>
>add_executable(vk_test
>  src/vulkan_test.cpp
>  )
>target_link_libraries(vk_test debug ${GLFW_LIB_D} optimized
>${GLFW_LIB})
>add_dependencies(vk_test glfw)
>==========
>
>As you can see, I depend on the libraries compiled by the external
>project
>glfw. Unfortunately, when I first configure the project, CMake
>complains
>that it cannot find the libraries specified by ${GLFW_LIB_D} and
>${GLFW_LIB} variables.
>
>Of course, this is because CMake did not begin cloning, configuring and
>building the glfw project. That only happens AFTER my project has been
>configured and starts building. This becomes a chicken and the egg
>problem.
>
>Currently, my solution is to add dummy .lib files so that I can at
>least
>configure and generate my project. My question is, am I approaching
>this
>problem in the wrong way? If yes, what is the correct way to add a
>dependency to an external project and have it clone/configure/build
>BEFORE
>the "find_library" call?

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ExternalProject_Add

James C. Sutherland
I found this solution helpful: 
It is unfortunate that CMake doesn't have a proper way to accomplish this.
--James


On Sun, Jan 8, 2017 at 10:07 PM, Hendrik Sattler <[hidden email]> wrote:
One possibility is the often mentioned superbuild, another is not using find_library() but setting the variables with the library file paths manually (that's static info anyway).


Am 8. Januar 2017 22:49:52 MEZ schrieb Saad Khattak <[hidden email]>:
>Hello,
>
>I have an external project glfw that I added to my project like this:
>
>==========
>include(ExternalProject)
>ExternalProject_Add(glfw
>  GIT_REPOSITORY "https://github.com/glfw/glfw.git"
>  GIT_TAG "master"
>
>  SOURCE_DIR "${CMAKE_SOURCE_DIR}/dep/glfw"
>  CMAKE_ARGS -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_TESTS=OFF
>-DGLFW_BUILD_EXAMPLES=OFF
>-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/install/glfw/
>-DCMAKE_DEBUG_POSTFIX=_d
>
>  TEST_COMMAND ""
>  )
>set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/install/glfw/include/")
>set(GLFW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/install/glfw/lib/")
>==========
>
>Then I include it in my project like so:
>
>==========
>find_library(GLFW_LIB_D  glfw3_d ${GLFW_LIBRARY_DIR})
>find_library(GLFW_LIB    glfw3   ${GLFW_LIBRARY_DIR})
>
>include_directories(${GLFW_INCLUDE_DIR})
>
>add_executable(vk_test
>  src/vulkan_test.cpp
>  )
>target_link_libraries(vk_test debug ${GLFW_LIB_D} optimized
>${GLFW_LIB})
>add_dependencies(vk_test glfw)
>==========
>
>As you can see, I depend on the libraries compiled by the external
>project
>glfw. Unfortunately, when I first configure the project, CMake
>complains
>that it cannot find the libraries specified by ${GLFW_LIB_D} and
>${GLFW_LIB} variables.
>
>Of course, this is because CMake did not begin cloning, configuring and
>building the glfw project. That only happens AFTER my project has been
>configured and starts building. This becomes a chicken and the egg
>problem.
>
>Currently, my solution is to add dummy .lib files so that I can at
>least
>configure and generate my project. My question is, am I approaching
>this
>problem in the wrong way? If yes, what is the correct way to add a
>dependency to an external project and have it clone/configure/build
>BEFORE
>the "find_library" call?

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
--

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:
http://public.kitware.com/mailman/listinfo/cmake


--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ExternalProject_Add

Saad Khattak
In reply to this post by Hendrik Sattler
>> One possibility is the often mentioned superbuild

That is a tempting and I started to go down that route - however, I ran into a problem where my project (which is now also built using ExternalProject_Add) does not have access to the CMake variables. Is the only solution to pass them through the CMAKE_ARGS variable in ExternalProject_Add?

On Mon, Jan 9, 2017 at 12:07 AM Hendrik Sattler <[hidden email]> wrote:
One possibility is the often mentioned superbuild, another is not using find_library() but setting the variables with the library file paths manually (that's static info anyway).


Am 8. Januar 2017 22:49:52 MEZ schrieb Saad Khattak <[hidden email]>:
>Hello,
>
>I have an external project glfw that I added to my project like this:
>
>==========
>include(ExternalProject)
>ExternalProject_Add(glfw
>  GIT_REPOSITORY "https://github.com/glfw/glfw.git"
>  GIT_TAG "master"
>
>  SOURCE_DIR "${CMAKE_SOURCE_DIR}/dep/glfw"
>  CMAKE_ARGS -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_TESTS=OFF
>-DGLFW_BUILD_EXAMPLES=OFF
>-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/install/glfw/
>-DCMAKE_DEBUG_POSTFIX=_d
>
>  TEST_COMMAND ""
>  )
>set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/install/glfw/include/")
>set(GLFW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/install/glfw/lib/")
>==========
>
>Then I include it in my project like so:
>
>==========
>find_library(GLFW_LIB_D  glfw3_d ${GLFW_LIBRARY_DIR})
>find_library(GLFW_LIB    glfw3   ${GLFW_LIBRARY_DIR})
>
>include_directories(${GLFW_INCLUDE_DIR})
>
>add_executable(vk_test
>  src/vulkan_test.cpp
>  )
>target_link_libraries(vk_test debug ${GLFW_LIB_D} optimized
>${GLFW_LIB})
>add_dependencies(vk_test glfw)
>==========
>
>As you can see, I depend on the libraries compiled by the external
>project
>glfw. Unfortunately, when I first configure the project, CMake
>complains
>that it cannot find the libraries specified by ${GLFW_LIB_D} and
>${GLFW_LIB} variables.
>
>Of course, this is because CMake did not begin cloning, configuring and
>building the glfw project. That only happens AFTER my project has been
>configured and starts building. This becomes a chicken and the egg
>problem.
>
>Currently, my solution is to add dummy .lib files so that I can at
>least
>configure and generate my project. My question is, am I approaching
>this
>problem in the wrong way? If yes, what is the correct way to add a
>dependency to an external project and have it clone/configure/build
>BEFORE
>the "find_library" call?

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ExternalProject_Add

Nicholas Braden
Yes, that is what I do in my superbuilds. Generally I make is such that my project could be built without the superbuild, and the superbuild is just a convenience.

On Sat, Jan 21, 2017 at 12:17 PM, Saad Khattak <[hidden email]> wrote:
>> One possibility is the often mentioned superbuild

That is a tempting and I started to go down that route - however, I ran into a problem where my project (which is now also built using ExternalProject_Add) does not have access to the CMake variables. Is the only solution to pass them through the CMAKE_ARGS variable in ExternalProject_Add?

On Mon, Jan 9, 2017 at 12:07 AM Hendrik Sattler <[hidden email]> wrote:
One possibility is the often mentioned superbuild, another is not using find_library() but setting the variables with the library file paths manually (that's static info anyway).


Am 8. Januar 2017 22:49:52 MEZ schrieb Saad Khattak <[hidden email]>:
>Hello,
>
>I have an external project glfw that I added to my project like this:
>
>==========
>include(ExternalProject)
>ExternalProject_Add(glfw
>  GIT_REPOSITORY "https://github.com/glfw/glfw.git"
>  GIT_TAG "master"
>
>  SOURCE_DIR "${CMAKE_SOURCE_DIR}/dep/glfw"
>  CMAKE_ARGS -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_TESTS=OFF
>-DGLFW_BUILD_EXAMPLES=OFF
>-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/install/glfw/
>-DCMAKE_DEBUG_POSTFIX=_d
>
>  TEST_COMMAND ""
>  )
>set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/install/glfw/include/")
>set(GLFW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/install/glfw/lib/")
>==========
>
>Then I include it in my project like so:
>
>==========
>find_library(GLFW_LIB_D  glfw3_d ${GLFW_LIBRARY_DIR})
>find_library(GLFW_LIB    glfw3   ${GLFW_LIBRARY_DIR})
>
>include_directories(${GLFW_INCLUDE_DIR})
>
>add_executable(vk_test
>  src/vulkan_test.cpp
>  )
>target_link_libraries(vk_test debug ${GLFW_LIB_D} optimized
>${GLFW_LIB})
>add_dependencies(vk_test glfw)
>==========
>
>As you can see, I depend on the libraries compiled by the external
>project
>glfw. Unfortunately, when I first configure the project, CMake
>complains
>that it cannot find the libraries specified by ${GLFW_LIB_D} and
>${GLFW_LIB} variables.
>
>Of course, this is because CMake did not begin cloning, configuring and
>building the glfw project. That only happens AFTER my project has been
>configured and starts building. This becomes a chicken and the egg
>problem.
>
>Currently, my solution is to add dummy .lib files so that I can at
>least
>configure and generate my project. My question is, am I approaching
>this
>problem in the wrong way? If yes, what is the correct way to add a
>dependency to an external project and have it clone/configure/build
>BEFORE
>the "find_library" call?

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

--

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:
http://public.kitware.com/mailman/listinfo/cmake


--

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:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ExternalProject_Add

Saad Khattak
That is a good point. I found that a side effect of the superbuild is that my project can be built independently and I can distribute it without the superbuild parent project. Thanks Nicholas!

On Sun, Jan 22, 2017 at 10:33 PM Nicholas Braden <[hidden email]> wrote:
Yes, that is what I do in my superbuilds. Generally I make is such that my project could be built without the superbuild, and the superbuild is just a convenience.

On Sat, Jan 21, 2017 at 12:17 PM, Saad Khattak <[hidden email]> wrote:
>> One possibility is the often mentioned superbuild

That is a tempting and I started to go down that route - however, I ran into a problem where my project (which is now also built using ExternalProject_Add) does not have access to the CMake variables. Is the only solution to pass them through the CMAKE_ARGS variable in ExternalProject_Add?

On Mon, Jan 9, 2017 at 12:07 AM Hendrik Sattler <[hidden email]> wrote:
One possibility is the often mentioned superbuild, another is not using find_library() but setting the variables with the library file paths manually (that's static info anyway).


Am 8. Januar 2017 22:49:52 MEZ schrieb Saad Khattak <[hidden email]>:
>Hello,
>
>I have an external project glfw that I added to my project like this:
>
>==========
>include(ExternalProject)
>ExternalProject_Add(glfw
>  GIT_REPOSITORY "https://github.com/glfw/glfw.git"
>  GIT_TAG "master"
>
>  SOURCE_DIR "${CMAKE_SOURCE_DIR}/dep/glfw"
>  CMAKE_ARGS -DGLFW_BUILD_DOCS=OFF -DGLFW_BUILD_TESTS=OFF
>-DGLFW_BUILD_EXAMPLES=OFF
>-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/install/glfw/
>-DCMAKE_DEBUG_POSTFIX=_d
>
>  TEST_COMMAND ""
>  )
>set(GLFW_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/install/glfw/include/")
>set(GLFW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/install/glfw/lib/")
>==========
>
>Then I include it in my project like so:
>
>==========
>find_library(GLFW_LIB_D  glfw3_d ${GLFW_LIBRARY_DIR})
>find_library(GLFW_LIB    glfw3   ${GLFW_LIBRARY_DIR})
>
>include_directories(${GLFW_INCLUDE_DIR})
>
>add_executable(vk_test
>  src/vulkan_test.cpp
>  )
>target_link_libraries(vk_test debug ${GLFW_LIB_D} optimized
>${GLFW_LIB})
>add_dependencies(vk_test glfw)
>==========
>
>As you can see, I depend on the libraries compiled by the external
>project
>glfw. Unfortunately, when I first configure the project, CMake
>complains
>that it cannot find the libraries specified by ${GLFW_LIB_D} and
>${GLFW_LIB} variables.
>
>Of course, this is because CMake did not begin cloning, configuring and
>building the glfw project. That only happens AFTER my project has been
>configured and starts building. This becomes a chicken and the egg
>problem.
>
>Currently, my solution is to add dummy .lib files so that I can at
>least
>configure and generate my project. My question is, am I approaching
>this
>problem in the wrong way? If yes, what is the correct way to add a
>dependency to an external project and have it clone/configure/build
>BEFORE
>the "find_library" call?

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

--

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:
http://public.kitware.com/mailman/listinfo/cmake

--

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:
http://public.kitware.com/mailman/listinfo/cmake
Loading...