[CMake] Testing for a target broke for me
Richard Shaw
hobbes1069 at gmail.com
Thu Dec 12 11:31:19 EST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131212/7e6e55a5/attachment.htm>
More information about the CMake
mailing list