From: <ai...@us...> - 2014-02-26 00:38:51
|
Revision: 13025 http://sourceforge.net/p/plplot/code/13025 Author: airwin Date: 2014-02-26 00:38:44 +0000 (Wed, 26 Feb 2014) Log Message: ----------- Use version of FindFreetype.cmake that is officially distributed with CMake. Tested on Linux with a build test and also a run-time test with -dev wxwidgets -drvopt freetype=1,backend=0 for example 24 which gave the usual crummy plfreetype results for that example. These tests exclude the gd and gcw devices (deprecated/retired) and the wingcc device (not available on Linux). Modified Paths: -------------- trunk/cmake/modules/freetype.cmake trunk/cmake/modules/gcw.cmake trunk/cmake/modules/gd.cmake trunk/cmake/modules/wingcc.cmake trunk/cmake/modules/wxwidgets.cmake trunk/src/CMakeLists.txt Removed Paths: ------------- trunk/cmake/modules/FindFreetype.cmake Deleted: trunk/cmake/modules/FindFreetype.cmake =================================================================== --- trunk/cmake/modules/FindFreetype.cmake 2014-02-25 00:27:53 UTC (rev 13024) +++ trunk/cmake/modules/FindFreetype.cmake 2014-02-26 00:38:44 UTC (rev 13025) @@ -1,26 +0,0 @@ -# - Find Freetype -# Find the native freetype includes and library -# This module defines -# FREETYPE_INCLUDE_DIR, where to find freetype header files. -# FREETYPE_LIBRARIES, the libraries needed to use freetype. -# FREETYPE_FOUND, If false, do not try to use freetype. -# also defined, but not for general use are -# FREETYPE_LIBRARY, where to find the freetype library. - -FIND_PATH(FREETYPE_INCLUDE_DIR freetype/config/ftheader.h -/usr/local/include/freetype2 -/usr/include/freetype2 -) - -SET(FREETYPE_NAMES ${FREETYPE_NAMES} freetype) -FIND_LIBRARY(FREETYPE_LIBRARY - NAMES ${FREETYPE_NAMES} - PATHS /usr/local/lib /usr/lib - ) - -IF (FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIR) - SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY}) - SET(FREETYPE_FOUND "YES") -ELSE (FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIR) - SET(FREETYPE_FOUND "NO") -ENDIF (FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIR) Modified: trunk/cmake/modules/freetype.cmake =================================================================== --- trunk/cmake/modules/freetype.cmake 2014-02-25 00:27:53 UTC (rev 13024) +++ trunk/cmake/modules/freetype.cmake 2014-02-26 00:38:44 UTC (rev 13025) @@ -1,6 +1,7 @@ # cmake/modules/freetype.cmake # # Copyright (C) 2006 Andrew Ross +# Copyright (C) 2014 Alan W. Irwin # # This file is part of PLplot. # @@ -29,7 +30,10 @@ if (WITH_FREETYPE) find_package(Freetype) if (FREETYPE_FOUND) - message(STATUS "FREETYPE_INCLUDE_DIR = ${FREETYPE_INCLUDE_DIR}") + #message(STATUS "FREETYPE_INCLUDE_DIRS = ${FREETYPE_INCLUDE_DIRS}") + string(REGEX REPLACE ";" " -I" FREETYPE_INCLUDE_CFLAGS "-I${FREETYPE_INCLUDE_DIRS}") + message(STATUS "FREETYPE_CFLAGS = ${FREETYPE_INCLUDE_CFLAGS}") + message(STATUS "FREETYPE_LIBRARIES = ${FREETYPE_LIBRARIES}") else (FREETYPE_FOUND) set(WITH_FREETYPE OFF Modified: trunk/cmake/modules/gcw.cmake =================================================================== --- trunk/cmake/modules/gcw.cmake 2014-02-25 00:27:53 UTC (rev 13024) +++ trunk/cmake/modules/gcw.cmake 2014-02-26 00:38:44 UTC (rev 13025) @@ -57,9 +57,7 @@ set(gcw_LINK_FLAGS "${linkflags1}") # Add freetype includes / libraries if required if (WITH_FREETYPE) - foreach(DIR ${FREETYPE_INCLUDE_DIR}) - set(gcw_COMPILE_FLAGS "${gcw_COMPILE_FLAGS} -I${DIR}") - endforeach(DIR ${FREETYPE_INCLUDE_DIR}) + set(gcw_COMPILE_FLAGS "${gcw_COMPILE_FLAGS} ${FREETYPE_INCLUDE_CFLAGS}") set(gcw_LINK_FLAGS ${gcw_LINK_FLAGS} ${FREETYPE_LIBRARIES}) endif (WITH_FREETYPE) else(linkflags1) Modified: trunk/cmake/modules/gd.cmake =================================================================== --- trunk/cmake/modules/gd.cmake 2014-02-25 00:27:53 UTC (rev 13024) +++ trunk/cmake/modules/gd.cmake 2014-02-26 00:38:44 UTC (rev 13025) @@ -45,7 +45,7 @@ else (NOT GD_FOUND) if (WITH_FREETYPE) - set(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIR}) + set(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) set(GD_LIBRARIES ${GD_LIBRARIES} ${FREETYPE_LIBRARIES}) endif (WITH_FREETYPE) endif (NOT GD_FOUND) Modified: trunk/cmake/modules/wingcc.cmake =================================================================== --- trunk/cmake/modules/wingcc.cmake 2014-02-25 00:27:53 UTC (rev 13024) +++ trunk/cmake/modules/wingcc.cmake 2014-02-26 00:38:44 UTC (rev 13025) @@ -44,7 +44,7 @@ if(WITH_FREETYPE) set( wingcc_COMPILE_FLAGS - "${wingcc_COMPILE_FLAGS} -I${FREETYPE_INCLUDE_DIR}" + "${wingcc_COMPILE_FLAGS} ${FREETYPE_INCLUDE_CFLAGS}" ) set( wingcc_LINK_FLAGS Modified: trunk/cmake/modules/wxwidgets.cmake =================================================================== --- trunk/cmake/modules/wxwidgets.cmake 2014-02-25 00:27:53 UTC (rev 13024) +++ trunk/cmake/modules/wxwidgets.cmake 2014-02-26 00:38:44 UTC (rev 13025) @@ -109,7 +109,7 @@ endif(HAVE_AGG) set( wxwidgets_COMPILE_FLAGS - "${wxwidgets_COMPILE_FLAGS} -I${FREETYPE_INCLUDE_DIR}" + "${wxwidgets_COMPILE_FLAGS} ${FREETYPE_INCLUDE_CFLAGS}" ) set( wxwidgets_LINK_FLAGS Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2014-02-25 00:27:53 UTC (rev 13024) +++ trunk/src/CMakeLists.txt 2014-02-26 00:38:44 UTC (rev 13025) @@ -244,7 +244,7 @@ if(NOT PLFREETYPE_COMPILE_PROPS) set(PLFREETYPE_COMPILE_PROPS) endif(NOT PLFREETYPE_COMPILE_PROPS) - set_source_files_properties(plfreetype.c PROPERTIES COMPILE_FLAGS "${PLFREETYPE_COMPILE_PROPS} -I${FREETYPE_INCLUDE_DIR}") + set_source_files_properties(plfreetype.c PROPERTIES COMPILE_FLAGS "${PLFREETYPE_COMPILE_PROPS} ${FREETYPE_INCLUDE_CFLAGS}") list(APPEND libplplot${LIB_TAG}_LINK_LIBRARIES ${FREETYPE_LIBRARIES}) endif(WITH_FREETYPE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |