[CMake] Re: Re: Target flags depending on compilation of
anothertarget
Rodolfo Schulz de Lima
rodolfo at rodsoft.org
Fri Dec 21 15:14:28 EST 2007
> 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. Only after wxWidgets is built I can use wx-config to extract
compiler and linker flags, that's the problem. When it is preinstalled, it's
a snap, find_package(wxWidgets) does the trick.
> 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.
Regards,
rod
More information about the CMake
mailing list