[CMake] Re: Re: Target flags depending on compilation of anothertarget

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Dec 21 16:10:12 EST 2007


On 2007-12-21 18:14-0200 Rodolfo Schulz de Lima wrote:

>> Have a look at the internals of FindwxWidgets.cmake that comes with
>> CMake-2.4.7.  It uses wx-config for the case where wxwidgets is already
>> externally installed.  It should be straightforward to adapt this module 
>> for
>> the case where you are building wxwidgets internally.
>
> I cannot use wx-config when I don't have wxWidgets installed because it 
> doesn't exists.

You are right. I was confusing cmake time with build time.  However, what is
to stop you building your own version of wxwidgets as an external project?
Then cmake; make, etc., would have to be run once to build wxwidgets and
once for your project.  If that turned out to be too complicated for your
users, you could put those commands in one overall script to simplify their
builds.

>
>> For PLplot we implement the compiler flags returned by
>> FindwxWidgets.cmakewith using the SET_SOURCE_FILES_PROPERTIES 
>> COMPILE_FLAGS
>
> FindwxWidgets actually does this parsing, while UsewxWidgets.cmake assigns 
> the variables to cmake's variables, you shouldn't have to do it by hand.

I believe you misunderstood.  We only want to use the wxwidgets compile
flags and link flags on a (extremely small) subset of our source files and
targets.  So we have to use the appropriate CMake commands to set that up.
It sounds like you may not have that requirement.

Alan

__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list