[CMake] CMake 2.4 (8) & WxWidgets + RichText Pt 2

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sat Apr 19 12:55:38 EDT 2008


On Fri, Apr 18, 2008 at 5:50 PM, Eric Torstenson wrote:
> I managed to find the ultimate cause of manual assignment using wx-config
> and CMAKE_CXX_FLAGS. This is what I was trying to do originally, but never
> had a successful link. This is directly calling "wx-config" myself, and then
> attempting to pass the results to the linker call.

Why are you trying to modify the CXX_FLAGS yourself (according to your
previous post) and not relying on what wx-config prints out? The
FindwxWidgets module in linux just returns the output of wx-config in
the standard variables for you to use, so you should not need to
modify does values.

>  When I add them in my WxWidgets.cmake file, the various linker stuff goes
> in front of the objects. I guess, since it's a static build of wxWidgets,
> those libs are thrown away before I ever have a need for them. I've moved
> the INCLUDE command so that the inclusion occurs after the ADD_EXECUTABLE
> command is made, but I still can't get it to link, due to the .a files being
> strewn at the front of the line. If I were using a dynamic version of the
> libraries, it would probably work, but I don't want those dependencies,
> since we share our binaries with other labs.

What INCLUDE? Are you setting the variable wxWidgets_USE_STATIC to ON?
It might not be the default if there is a shared build installed as
well.

>  Is there something I can do to rearrange the order these flags are added to
> the link step? Also, is there a way to get access to the actual line that
> will be sent to the linker? I hate for these to be sent to the compiler too,
> since there are quite a few.

You should figure out how to call the FindwxWidgets appropriately and
not try to do this work around. This would defeat the purpose of using
CMake.

--Miguel


More information about the CMake mailing list