You should use cmake-gui or ccmake.
There you find the option WXART2D_USE_FREETYPE.
If you compiled freetype in its location in thirdparty dir, it should find it.

If the option is not set true/1, it will not search for it.

Also first delete the cache file of cmake, to start the configure from scratch.

Maybe the names of the mingw libraries are called different for freetype.

packages/wxart2d/share/wxwidgets/FindFreetype.cmake

Is doing the search, for
NAMES freetype242.lib freetype242_D.lib freetype242MT.lib freetype242MT_D.lib

on windows, how or they called in the mingw case??

You can always put MESSAGE( ${whatevervar} ), in FindFreetype.cmake in order to 
see what is going on.

The top CmakeLists.txt file in wxart2d package searches it here:
set( FREETYPE_DIR ${THIRDPARTY_PATH}/freetype-2.4.2 )

All in all, option( WXART2D_USE_FREETYPE "Enable Freetype text module" ON )
is default on, and it looks like it find half of freetype (headers), but does 
not find the libs.

Don't set those dir vars yourself, just the option must be set. IF that does 
not work we need to 
correct it.
And clear  the cache in cmake-gui.

Klaas

On 04/14/2011 05:06 AM, damateem wrote:
> I've compiled Freetype, but how do I get wxArt2D to use it?
>
> When I run Cmake for wxArt2D using
>
> cmake -DwxWidgets_USE_DEBUG:BOOL=0 -DwxWidgets_USE_MONOLITHIC:BOOL=1
> -DwxWidgets_USE_UNICODE:BOOL=0 -DwxWidgets_USE_STATIC:BOOL=1
> -G"CodeBlocks - MinGW Makefiles"
> c:\user_data\david\code\source_pool\wxArt2D\packages\wxart2d
>
> I get
>
> -- searching Freetype via:
> c:/user_data/david/dajac/source_pool/wxArt2D/packages/wxart2d/share/wxwidgets
> -- Could NOT find Freetype (missing:  FREETYPE_LIBRARY
> FREETYPE_LIBRARY_DIRS)
> -- FREETYPE was not found.
> CMake Error at CMakeLists.txt:476 (MESSAGE):
>    freetype not found
>
> If I run the same cmake command again, the error is gone and all seems
> fine. So I assume, the cmake script is smart enough to know that if it
> can't find Freetype, then leave it out. To help in locating Freetype, I
> defined FREETYPE_LIBRARY and FREETYPE_LIBRARY_DIRS when calling cmake,
> as follows.
>
> cmake -DwxWidgets_USE_DEBUG:BOOL=0 -DwxWidgets_USE_MONOLITHIC:BOOL=1
> -DwxWidgets_USE_UNICODE:BOOL=0 -DwxWidgets_USE_STATIC:BOOL=1
> -DFREETYPE_LIBRARY:STRING="freetype.a"
> -DFREETYPE_LIBRARY_DIRS:PATH="C:\user_data\david\code\source_pool\wxArt2D\thirdparty\freetype-2.4.2\objs"
> -G"CodeBlocks - MinGW Makefiles"
> c:\user_data\david\code\source_pool\wxArt2D\packages\wxart2d
>
> This prevents the "freetype not found" error from Cmake, but when I
> build with mingw32-make, I get this error:
>
> Linking CXX executable test_canvas_tiletest.exe
> c:/progra~2/codebl~1/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe:
> cannot find -lfreetype
> collect2: ld returned 1 exit status
> mingw32-make[2]: *** [test/tiletest/test_canvas_tiletest.exe] Error 1
> mingw32-make[1]: ***
> [test/tiletest/CMakeFiles/test_canvas_tiletest.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
> I suspect I'm setting FREETYPE_LIBRARY and FREETYPE_LIBRARY_DIRS
> incorrectly. What should be their values?
>
> Thanks,
> David
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> Wxart2d-users_dev mailing list
> Wxart2d-users_dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
>


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to