diff options
| author | Campbell Barton <ideasman42@gmail.com> | 2011-06-13 22:47:55 +0000 |
|---|---|---|
| committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-13 22:47:55 +0000 |
| commit | 2d1fed0c497cc729315683c106a6e2331e0e8990 (patch) | |
| tree | f8afb1ad5e891a68e6193c49fae9ff0193d230bd /CMakeScripts | |
| parent | cmake: (diff) | |
| download | inkscape-2d1fed0c497cc729315683c106a6e2331e0e8990.tar.gz inkscape-2d1fed0c497cc729315683c106a6e2331e0e8990.zip | |
cmake: use cmakes freetype module
(bzr r10298)
Diffstat (limited to 'CMakeScripts')
| -rw-r--r-- | CMakeScripts/DefineDependsandFlags.cmake | 24 | ||||
| -rw-r--r-- | CMakeScripts/FindFreetype2.cmake | 90 |
2 files changed, 8 insertions, 106 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 6c0abf362..0797362d3 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -16,11 +16,6 @@ list(APPEND INKSCAPE_INCS ${GSL_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${GSL_LIBRARIES}) list(APPEND INKSCAPE_LIBS "-lgslcblas") # FIXME -find_package(Freetype2 REQUIRED) # our own -list(APPEND INKSCAPE_INCS ${FREETYPE2_INCLUDE_DIR}) -list(APPEND INKSCAPE_LIBS ${FREETYPE2_LIBRARIES}) - - find_package(GnomeVFS2) list(APPEND INKSCAPE_INCS ${GNOMEVFS2_INCLUDE_DIR}) list(APPEND INKSCAPE_LIBS ${GNOMEVFS-2_LIBRARY}) @@ -90,9 +85,13 @@ list(APPEND INKSCAPE_LIBS ) +find_package(Freetype REQUIRED) +list(APPEND INKSCAPE_INCS ${FREETYPE_INCLUDE_DIRS}) +list(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES}) + find_package(Boost REQUIRED) list(APPEND INKSCAPE_INCS ${Boost_INCLUDE_DIRS}) -list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES}) +# list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES}) find_package(ASPELL) list(APPEND INKSCAPE_INCS ${ASPELL_INCLUDE_DIR}) @@ -133,16 +132,9 @@ list(APPEND INKSCAPE_LIBS ${ImageMagick_Magick++_LIBRARY}) include(IncludeJava) # end Dependencies -# ---------------------------------------------------------------------------- -# Optional -# ---------------------------------------------------------------------------- - -if(WITH_DBUS) - # XXX, needs s module - list(APPEND INKSCAPE_INCS "/usr/include/dbus-1.0") - list(APPEND INKSCAPE_INCS "/usr/lib/dbus-1.0/include") - list(APPEND INKSCAPE_LIBS "/usr/lib/libdbus-1.so") -endif() +# message(FATAL_ERROR "Whee: ${INKSCAPE_INCS}") +# message(FATAL_ERROR "Whee: ${INKSCAPE_LIBS}") +# message(FATAL_ERROR "Whee: ${INKSCAPE_LINK_DIRS}") # C/C++ Flags include_directories(${INKSCAPE_INCS}) diff --git a/CMakeScripts/FindFreetype2.cmake b/CMakeScripts/FindFreetype2.cmake deleted file mode 100644 index 140dbd6c0..000000000 --- a/CMakeScripts/FindFreetype2.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# - Try to find FREETYPE2 -# Once done this will define -# -# FREETYPE2_FOUND - system has FREETYPE2 -# FREETYPE2_INCLUDE_DIRS - the FREETYPE2 include directory -# FREETYPE2_LIBRARIES - Link these to use FREETYPE2 -# FREETYPE2_DEFINITIONS - Compiler switches required for using FREETYPE2 -# -# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com> -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - - -if (FREETYPE2_LIBRARIES AND FREETYPE2_INCLUDE_DIRS) - # in cache already - set(FREETYPE2_FOUND TRUE) -else (FREETYPE2_LIBRARIES AND FREETYPE2_INCLUDE_DIRS) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - include(UsePkgConfig) - pkgconfig(freetype2 _FREETYPE2_INCLUDEDIR _FREETYPE2_LIBDIR _FREETYPE2_LDFLAGS _FREETYPE2_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(_FREETYPE2 freetype2) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_path(FREETYPE2_INCLUDE_DIR - NAMES - freetype/freetype.h - PATHS - ${_FREETYPE2_INCLUDEDIR} - /usr/include - /usr/local/include - /opt/local/include - /sw/include - $ENV{DEVLIBS_PATH}//include// - PATH_SUFFIXES - freetype2 - ) - - find_library(FREETYPE_LIBRARY - NAMES - freetype - PATHS - ${_FREETYPE2_LIBDIR} - /usr/lib - /usr/local/lib - /opt/local/lib - /sw/lib - ) - - if (FREETYPE_LIBRARY) - set(FREETYPE_FOUND TRUE) - endif (FREETYPE_LIBRARY) - - set(FREETYPE2_INCLUDE_DIRS - ${FREETYPE2_INCLUDE_DIR} - ) - - if (FREETYPE_FOUND) - set(FREETYPE2_LIBRARIES - ${FREETYPE2_LIBRARIES} - ${FREETYPE_LIBRARY} - ) - endif (FREETYPE_FOUND) - - if (FREETYPE2_INCLUDE_DIRS AND FREETYPE2_LIBRARIES) - set(FREETYPE2_FOUND TRUE) - endif (FREETYPE2_INCLUDE_DIRS AND FREETYPE2_LIBRARIES) - - if (FREETYPE2_FOUND) - if (NOT FREETYPE2_FIND_QUIETLY) - message(STATUS "Found FREETYPE2: ${FREETYPE2_LIBRARIES}") - endif (NOT FREETYPE2_FIND_QUIETLY) - else (FREETYPE2_FOUND) - if (FREETYPE2_FIND_REQUIRED) - message(FATAL_ERROR "Could not find FREETYPE2") - endif (FREETYPE2_FIND_REQUIRED) - endif (FREETYPE2_FOUND) - - # show the FREETYPE2_INCLUDE_DIRS and FREETYPE2_LIBRARIES variables only in the advanced view - mark_as_advanced(FREETYPE2_INCLUDE_DIRS FREETYPE2_LIBRARIES) - -endif (FREETYPE2_LIBRARIES AND FREETYPE2_INCLUDE_DIRS) - |
