I tested this weekend on Fedora8 and i works for me.
My problem is definitly cmake related.
As stated in your install hints i made a build dir. Structure is like
that: /misc/wxArt2D #sources
/misc/wxArt2Dbuild #build dir
from within the build dir i launch
ccmake /misc/wxArt2D
This looks oke.
The problem is that ccmak does something i don't understand. It not only
lists the wxlibs in the WXART2D_LIBRARIES entry, but also the path. It
looks like this:
kbool;antigrain;expat;/misc/wxWidgets-2.8.7/GCCBuildDebugGTK2UnicodeDLL/l
ib;wx_gtk2ud_gl-2.8;
wx_gtk2ud_aui-2.8;wx_gtk2ud_stc-2.8;wx_gtk2ud_qa-2.8;wx_gtk2ud_xrc-2.8;wx
_gtk2ud_html-2.8;
wx_gtk2ud_adv-2.8;wx_baseud_xml-2.8;wx_baseud_net-2.8;wx_gtk2ud_core-2.8;
wx_baseud-2.8
The output of my wx-config --libs is:
-L/misc/wxWidgets-2.8.7/GCCBuildDebugGTK2UnicodeDLL/lib -pthread
-Wl,-rpath,/misc/wxWidgets-2.8.7/GCCBuildDebugGTK2UnicodeDLL/lib
-lwx_gtk2ud_richtext-2.8 -lwx_gtk2ud_aui-2.8 -lwx_gtk2ud_xrc-2.8
-lwx_gtk2ud_qa-2.8 -lwx_gtk2ud_html-2.8 -lwx_gtk2ud_dbgrid-2.8
-lwx_gtk2ud_adv-2.8 -lwx_gtk2ud_core-2.8 -lwx_baseud_odbc-2.8
-lwx_baseud_xml-2.8 -lwx_baseud_net-2.8 -lwx_baseud-2.8
Oke, then there is a problem in FindwxWidgets.cmake around here:
IF( "${RET}" STREQUAL "0" )
STRING(REGEX REPLACE " " ";" wxWidgets_LIBRARIES
"${wxWidgets_LIBRARIES}")
STRING(REGEX REPLACE "-framework;" "-framework "
wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
# extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
STRING(REGEX MATCHALL "-L[^ ;]*" wxWidgets_LIBRARY_DIRS
"${wxWidgets_LIBRARIES}")
STRING(REGEX REPLACE "-L" "" wxWidgets_LIBRARY_DIRS
"${wxWidgets_LIBRARY_DIRS}")
# convert space to semicolons for list
STRING(REGEX REPLACE " " ";" wxWidgets_LIBRARY_DIRS
"${wxWidgets_LIBRARY_DIRS}")
STRING(REGEX REPLACE "-L[^ ;]*" "" wxWidgets_LIBRARIES
"${wxWidgets_LIBRARIES}")
STRING(REGEX MATCHALL "-l[^ ;]*" wxWidgets_LIBRARIES_dynamic
"${wxWidgets_LIBRARIES}")
STRING(REGEX MATCHALL "/[^ ;]*" wxWidgets_LIBRARIES_static
"${wxWidgets_LIBRARIES}")
SET( wxWidgets_LIBRARIES
"${wxWidgets_LIBRARIES_static};${wxWidgets_LIBRARIES_dynamic}" )
STRING(REGEX REPLACE "-l" "" wxWidgets_LIBRARIES
"${wxWidgets_LIBRARIES}")
ELSE( "${RET}" STREQUAL "0" )
I need to do all this, to get only the libraries, i think the next is not
filtered out.
-rpath,/misc/wxWidgets-2.8.7/GCCBuildDebugGTK2UnicodeDLL/lib
I think it is seen as a static library now, quick fix i think can be:
STRING(REGEX REPLACE
"-rpath,/misc/wxWidgets-2.8.7/GCCBuildDebugGTK2UnicodeDLL/lib" ""
wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
The real fix i need to try and error, because i hate regular expressions
:-)
When i execute make i first get lots of these messages, one for every
example: ""Warning: Ignoring path found in link libraries for target:
mars, path is: /misc/wxWidgets-2.8.7/GCCBuildDebugGTK2UnicodeDLL/lib.
Expected a library name or a full path to a library name."
Of course, there is no such library :-)
an later then:
Linking CXX executable mars
/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/ld:
cannot find -lwx_gtk2ud_gl-2.8
What is the name of the library having gl in it?
Did you compile wxwidgets with --with-opengl?
Or in this part remove gl.
IF ( ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" )
SET( wxWidgets_FIND_STYLE "UNIX_STYLE_FIND" CACHE STRING "wxWidgets
find style" FORCE )
IF( CYGWIN OR MINGW )
SET (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING
"Flags used by the compiler during release builds"
FORCE)
SET (CMAKE_C_FLAGS_RELEASE "-DNDEBUG" CACHE STRING
"Flags used by the compiler during release builds"
FORCE)
ENDIF( CYGWIN OR MINGW )
IF( wxWidgets_USE_MONOLITHIC )
SET(wxWidgets_USE_LIBS mono things netutils gizmos_xrc gl stc )
ELSE( wxWidgets_USE_MONOLITHIC )
SET(wxWidgets_USE_LIBS gl aui stc qa xrc html adv xml net core
base )
ENDIF( wxWidgets_USE_MONOLITHIC )
ENDIF ( ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" )
It is not needed yet, only for my own apps ;-)
Of course! Regrettably i havn't worked with cmake before and therefore i
have no experience where to look at. I tried to edit the
WXART2D_LIBRARIES entry using the curses interface ccmake, but before i
get the option "g" for generate, i have to make a "c" for configure and
after this the
WXART2D_LIBRARIES entry contains the path to the wxlibs again.
See the above, to fix it, will have a look at home to fix it really.
I made a start with 2.9 compilations, so there might be some small problems
in compilation. Many things did change in wxWidgets, so i am trying to have
it running for 2.8 and 2.9, but this is a bit complicated.
Thanks,
Klaas