744N/A# - Try to find GnomeVFS2
744N/A# Once done this will define
744N/A# GNOMEVFS2_FOUND - system has GnomeVFS2
744N/A# GNOMEVFS2_INCLUDE_DIRS - the GnomeVFS2 include directory
744N/A# GNOMEVFS2_LIBRARIES - Link these to use GnomeVFS2
744N/A# GNOMEVFS2_DEFINITIONS - Compiler switches required for using GnomeVFS2
744N/A# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
744N/A# Redistribution and use is allowed according to the terms of the New
744N/A# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
744N/Aif (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
744N/A set(GNOMEVFS2_FOUND TRUE)
744N/Aelse (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
744N/A # use pkg-config to get the directories and then use these values
744N/A # in the FIND_PATH() and FIND_LIBRARY() calls
744N/A if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
744N/A pkgconfig(gnome-vfs-2.0 _GNOMEVFS2_INCLUDEDIR _GNOMEVFS2_LIBDIR _GNOMEVFS2_LDFLAGS _GNOMEVFS2_CFLAGS)
744N/A else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
744N/A find_package(PkgConfig)
744N/A pkg_check_modules(_GNOMEVFS2 gnome-vfs-2.0)
744N/A endif (PKG_CONFIG_FOUND)
744N/A endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
749N/A find_path(GNOMEVFS2_INCLUDE_DIR
744N/A ${_GNOMEVFS2_INCLUDEDIR}
744N/A find_library(GNOMEVFS-2_LIBRARY
set(GNOMEVFS-2_FOUND TRUE)
endif (GNOMEVFS-2_LIBRARY)
set(GNOMEVFS2_INCLUDE_DIRS
if (GNOMEVFS2_INCLUDE_DIRS AND GNOMEVFS2_LIBRARIES)
set(GNOMEVFS2_FOUND TRUE)
endif (GNOMEVFS2_INCLUDE_DIRS AND GNOMEVFS2_LIBRARIES)
if (NOT GnomeVFS2_FIND_QUIETLY)
message(STATUS "Found GnomeVFS2: ${GNOMEVFS2_LIBRARIES}")
endif (NOT GnomeVFS2_FIND_QUIETLY)
if (GnomeVFS2_FIND_REQUIRED)
message(FATAL_ERROR "Could not find GnomeVFS2")
endif (GnomeVFS2_FIND_REQUIRED)
# show the GNOMEVFS2_INCLUDE_DIRS and GNOMEVFS2_LIBRARIES variables only in the advanced view
mark_as_advanced(GNOMEVFS2_INCLUDE_DIRS GNOMEVFS2_LIBRARIES)
endif (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)