This is a case for ExternalProjects.
http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html

Also search for 'cmake superbuild' for discussion of how people are using
external projects.

An example build setup for prerequisites/projects here:
https://github.com/BRAINSia/NamicExternalProjects



--
Kent Williams norman-k-willi...@uiowa.edu






On 12/12/13 10:31 AM, "Richard Shaw" <hobbes1...@gmail.com> wrote:

>I've had this working and I don't *THINK* I changed anything that would
>cause it to fail now but I'm not completely sure.
>
>
>I have a project I converted over to cmake from automake which requires
>wxWidgets 3.0 (or the 2.9 devel branch). Although it just released I
>still want to maintain the ability to build it within the project itself
>for distro's that are slow to adopt it
> (on linux) or windows/mac as well.
>
>
>Because wxWidgets uses a custom script to get compiler flags and includes
>I have to "bootstrap" the build such that the first time you run
>cmake/make it builds wxWidgets and the second time it builds the project.
>To that end I had the follow strategy working:
>
>
>#
># Pull in external wxWidgets target if performing static build.
>#
>if(BOOTSTRAP_WXWIDGETS)
>    include(cmake/BuildWxWidgets.cmake)
>endif(BOOTSTRAP_WXWIDGETS)
>
>
>#
># Perform bootstrap build of wxWidgets
>#
>if(BOOTSTRAP_WXWIDGETS AND NOT TARGET wxWidgets)
>    message(STATUS "Will perform bootstrap build of wxWidgets.
>   After make step completes, re-run cmake and make again to perform
>FreeDV build.")
>#
># Continue normal build if not bootstrapping wxWidgets or already built
>it.
>#
>else(BOOTSTRAP_WXWIDGETS AND NOT TARGET wxWidgets)
>
>
>
><continue normal build>
>
>
>endif(BOOTSTRAP_WXWIDGETS AND NOT TARGET wxWidgets)
>
>---
>
>
>Even though I can verify that BOOTSTRAP_WXWIDGETS is true, it's failing
>the conditional and I can only assume it has to do with the target
>checking.
>
>
>Any ideas?
>
>
>Thanks,
>Richard
>



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
________________________________
--

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

Reply via email to