[cmake] cleaned out unused cmake files
This commit is contained in:
parent
25f3633dc5
commit
0529658e75
@ -675,7 +675,7 @@ find_feature(PCSC ${PCSC_FEATURE_TYPE} ${PCSC_FEATURE_PURPOSE} ${PCSC_FEATURE_DE
|
||||
|
||||
option(WITH_AAD "Compile with support for Azure AD authentication" ON)
|
||||
if (WITH_AAD)
|
||||
find_package(CJSON REQUIRED)
|
||||
find_package(cJSON REQUIRED)
|
||||
include_directories(${CJSON_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
find_package(SDL2TTF REQUIRED COMPONENTS)
|
||||
include_directories(${SDL2TTF_INCLUDE_DIR})
|
||||
find_package(SDL2_ttf REQUIRED COMPONENTS)
|
||||
include_directories(${SDL2_ttf_INCLUDE_DIR})
|
||||
set(SRCS
|
||||
sdl_button.hpp
|
||||
sdl_button.cpp
|
||||
@ -23,10 +23,18 @@ set(SRCS
|
||||
|
||||
set(LIBS
|
||||
${SDL2_LIBRARIES}
|
||||
${SDL2TTF_LIBRARY}
|
||||
font
|
||||
winpr
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
list(APPEND LIBS
|
||||
SDL2_ttf::SDL2_ttf
|
||||
)
|
||||
else()
|
||||
list(APPEND LIBS
|
||||
SDL2_ttf::SDL2_ttf-static
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(font)
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
# - Try to find CJSON
|
||||
# Once done this will define
|
||||
# CJSON_FOUND - cJSON was found
|
||||
# CJSON_INCLUDE_DIRS - cJSON include directories
|
||||
# CJSON_LIBRARIES - cJSON libraries for linking
|
||||
|
||||
find_path(CJSON_INCLUDE_DIR
|
||||
NAMES cjson/cJSON.h)
|
||||
|
||||
find_library(CJSON_LIBRARY
|
||||
NAMES cjson)
|
||||
|
||||
if (CJSON_INCLUDE_DIR AND CJSON_LIBRARY)
|
||||
set(CJSON_FOUND ON)
|
||||
set(CJSON_INCLUDE_DIRS ${CJSON_INCLUDE_DIR})
|
||||
set(CJSON_LIBRARIES ${CJSON_LIBRARY})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(CJSON_INCLUDE_DIRS CJSON_LIBRARIES)
|
@ -1,73 +0,0 @@
|
||||
# - Try to find the low-level D-Bus library
|
||||
# Once done this will define
|
||||
#
|
||||
# DBUS_FOUND - system has D-Bus
|
||||
# DBUS_INCLUDE_DIR - the D-Bus include directory
|
||||
# DBUS_ARCH_INCLUDE_DIR - the D-Bus architecture-specific include directory
|
||||
# DBUS_LIBRARIES - the libraries needed to use D-Bus
|
||||
|
||||
# Copyright (c) 2008, Kevin Kofler, <kevin.kofler@chello.at>
|
||||
# modeled after FindLibArt.cmake:
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
|
||||
|
||||
# in cache already
|
||||
SET(DBUS_FOUND TRUE)
|
||||
|
||||
else (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
|
||||
|
||||
IF (NOT WIN32)
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
IF (PKG_CONFIG_FOUND)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
pkg_check_modules(_DBUS_PC QUIET dbus-1)
|
||||
ENDIF (PKG_CONFIG_FOUND)
|
||||
ENDIF (NOT WIN32)
|
||||
|
||||
FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h
|
||||
${_DBUS_PC_INCLUDE_DIRS}
|
||||
/usr/include
|
||||
/usr/include/dbus-1.0
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_PATH(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h
|
||||
${_DBUS_PC_INCLUDE_DIRS}
|
||||
/usr/lib${LIB_SUFFIX}/include
|
||||
/usr/lib${LIB_SUFFIX}/dbus-1.0/include
|
||||
/usr/lib64/include
|
||||
/usr/lib64/dbus-1.0/include
|
||||
/usr/lib/include
|
||||
/usr/lib/dbus-1.0/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 dbus
|
||||
PATHS
|
||||
${_DBUS_PC_LIBDIR}
|
||||
)
|
||||
|
||||
|
||||
if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
|
||||
set(DBUS_FOUND TRUE)
|
||||
endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
|
||||
|
||||
|
||||
if (DBUS_FOUND)
|
||||
if (NOT DBus_FIND_QUIETLY)
|
||||
message(STATUS "Found D-Bus: ${DBUS_LIBRARIES}")
|
||||
endif (NOT DBus_FIND_QUIETLY)
|
||||
else (DBUS_FOUND)
|
||||
if (DBus_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find D-Bus")
|
||||
endif (DBus_FIND_REQUIRED)
|
||||
endif (DBUS_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES)
|
||||
|
||||
endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
|
||||
|
@ -1,42 +0,0 @@
|
||||
# DbusGlib library detection
|
||||
#
|
||||
# Copyright 2013 Thincast Technologies GmbH
|
||||
# Copyright 2013 Armin Novak <armin.novak@thincast.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_DBUS_GLIB QUIET dbus-glib-1)
|
||||
set(DBUS_GLIB_DEFINITIONS ${PC_DBUS_GLIB_CFLAGS_OTHER})
|
||||
|
||||
find_path(DBUS_GLIB_INCLUDE_DIR dbus/dbus-glib.h
|
||||
HINTS ${PC_DBUS_GLIB_INCLUDEDIR} ${PC_DBUS_GLIB_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES dbus-glib-1 )
|
||||
|
||||
find_library(DBUS_GLIB_LIBRARY NAMES dbus-glib-1 dbus-glib
|
||||
HINTS ${PC_DBUS_GLIB_LIBDIR} ${PC_DBUS_GLIB_LIBRARY_DIRS} )
|
||||
|
||||
set(DBUS_GLIB_LIBRARIES ${DBUS_GLIB_LIBRARY} )
|
||||
set(DBUS_GLIB_INCLUDE_DIRS ${DBUS_GLIB_INCLUDE_DIR} )
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set DBUS_GLIB_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(dbus-glib DEFAULT_MSG
|
||||
DBUS_GLIB_LIBRARY DBUS_GLIB_INCLUDE_DIR)
|
||||
|
||||
if(DBUS_GLIB_LIBRARIES AND DBUS_GLIB_INCLUDE_DIRS)
|
||||
set(DBUS_GLIB_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(DBUS_GLIB_INCLUDE_DIR DBUS_GLIB_LIBRARY)
|
@ -1,31 +0,0 @@
|
||||
# Configure devd environment
|
||||
#
|
||||
# DEVD_FOUND - system has a devd
|
||||
# DEVD_BIN_DIR - devd bin dir
|
||||
# DEVD_SKT_DIR - devd socket dir
|
||||
#
|
||||
# Copyright (c) 2015 Rozhuk Ivan <rozhuk.im@gmail.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
#
|
||||
|
||||
|
||||
FIND_PATH(
|
||||
DEVD_BIN_DIR
|
||||
NAMES devd
|
||||
PATHS /sbin /usr/sbin /usr/local/sbin
|
||||
)
|
||||
|
||||
FIND_PATH(
|
||||
DEVD_SKT_DIR
|
||||
NAMES devd.seqpacket.pipe devd.pipe
|
||||
PATHS /var/run/
|
||||
)
|
||||
|
||||
|
||||
if (DEVD_BIN_DIR)
|
||||
set(DEVD_FOUND "YES")
|
||||
message(STATUS "devd found")
|
||||
if (NOT DEVD_SKT_DIR)
|
||||
message(STATUS "devd not running!")
|
||||
endif (NOT DEVD_SKT_DIR)
|
||||
endif (DEVD_BIN_DIR)
|
@ -1,153 +0,0 @@
|
||||
# - Try to find Gstreamer and its plugins
|
||||
# Once done, this will define
|
||||
#
|
||||
# GSTREAMER_1_0_FOUND - system has Gstreamer
|
||||
# GSTREAMER_1_0_INCLUDE_DIRS - the Gstreamer include directories
|
||||
# GSTREAMER_1_0_LIBRARIES - link these to use Gstreamer
|
||||
#
|
||||
# Additionally, gstreamer-base is always looked for and required, and
|
||||
# the following related variables are defined:
|
||||
#
|
||||
# GSTREAMER_1_0_BASE_INCLUDE_DIRS - gstreamer-base's include directory
|
||||
# GSTREAMER_1_0_BASE_LIBRARIES - link to these to use gstreamer-base
|
||||
#
|
||||
# Optionally, the COMPONENTS keyword can be passed to find_package()
|
||||
# and Gstreamer plugins can be looked for. Currently, the following
|
||||
# plugins can be searched, and they define the following variables if
|
||||
# found:
|
||||
#
|
||||
# gstreamer-app: GSTREAMER_1_0_APP_INCLUDE_DIRS and GSTREAMER_1_0_APP_LIBRARIES
|
||||
# gstreamer-audio: GSTREAMER_1_0_AUDIO_INCLUDE_DIRS and GSTREAMER_1_0_AUDIO_LIBRARIES
|
||||
# gstreamer-fft: GSTREAMER_1_0_FFT_INCLUDE_DIRS and GSTREAMER_1_0_FFT_LIBRARIES
|
||||
# gstreamer-pbutils: GSTREAMER_1_0_PBUTILS_INCLUDE_DIRS and GSTREAMER_1_0_PBUTILS_LIBRARIES
|
||||
# gstreamer-video: GSTREAMER_1_0_VIDEO_INCLUDE_DIRS and GSTREAMER_1_0_VIDEO_LIBRARIES
|
||||
#
|
||||
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
# The minimum Gstreamer version we support.
|
||||
set(GSTREAMER_1_0_MINIMUM_VERSION 1.0.5)
|
||||
|
||||
# Helper macro to find a Gstreamer plugin (or Gstreamer itself)
|
||||
# _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_1_0_AUDIO")
|
||||
# _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
|
||||
# _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
|
||||
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library)
|
||||
# FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
|
||||
|
||||
string(REGEX MATCH "(.*)>=(.*)" _dummy "${_pkgconfig_name}")
|
||||
if ("${CMAKE_MATCH_2}" STREQUAL "")
|
||||
pkg_check_modules(PC_${_component_prefix} "${_pkgconfig_name} >= ${GSTREAMER_1_0_MINIMUM_VERSION}")
|
||||
else ()
|
||||
pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
|
||||
endif ()
|
||||
set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS})
|
||||
|
||||
find_library(${_component_prefix}_LIBRARIES
|
||||
NAMES ${_library} gstreamer_android
|
||||
HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR} ${GSTREAMER_1_0_ROOT_DIR}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# ------------------------
|
||||
# 1. Find Gstreamer itself
|
||||
# ------------------------
|
||||
|
||||
# 1.1. Find headers and libraries
|
||||
set(GLIB_ROOT_DIR ${GSTREAMER_1_0_ROOT_DIR})
|
||||
find_package(Glib REQUIRED)
|
||||
FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0 gstreamer-1.0 gstreamer-1.0)
|
||||
FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_BASE gstreamer-base-1.0 gstbase-1.0)
|
||||
|
||||
# 1.2. Check Gstreamer version
|
||||
if (GSTREAMER_1_0_INCLUDE_DIRS)
|
||||
if (EXISTS "${GSTREAMER_1_0_INCLUDE_DIRS}/gst/gstversion.h")
|
||||
file(READ "${GSTREAMER_1_0_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
|
||||
|
||||
string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
|
||||
set(GSTREAMER_1_0_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
|
||||
string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_1_0_VERSION_CONTENTS}")
|
||||
set(GSTREAMER_1_0_VERSION_MINOR "${CMAKE_MATCH_1}")
|
||||
|
||||
string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_1_0_VERSION_CONTENTS}")
|
||||
set(GSTREAMER_1_0_VERSION_MICRO "${CMAKE_MATCH_1}")
|
||||
|
||||
set(GSTREAMER_1_0_VERSION "${GSTREAMER_1_0_VERSION_MAJOR}.${GSTREAMER_1_0_VERSION_MINOR}.${GSTREAMER_1_0_VERSION_MICRO}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# FIXME: With CMake 2.8.3 we can just pass GSTREAMER_1_0_VERSION to FIND_PACKAGE_HANDLE_STANDARD_ARGS as VERSION_VAR
|
||||
# and remove the version check here (GSTREAMER_1_0_MINIMUM_VERSION would be passed to FIND_PACKAGE).
|
||||
set(VERSION_OK TRUE)
|
||||
if ("${GSTREAMER_1_0_VERSION}" VERSION_LESS "${GSTREAMER_1_0_MINIMUM_VERSION}")
|
||||
set(VERSION_OK FALSE)
|
||||
endif ()
|
||||
|
||||
# -------------------------
|
||||
# 2. Find Gstreamer plugins
|
||||
# -------------------------
|
||||
|
||||
FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_APP gstreamer-app-1.0 gstapp-1.0)
|
||||
FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_AUDIO gstreamer-audio-1.0 gstaudio-1.0)
|
||||
FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_FFT gstreamer-fft-1.0 gstfft-1.0)
|
||||
FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_PBUTILS gstreamer-pbutils-1.0 gstpbutils-1.0)
|
||||
FIND_GSTREAMER_COMPONENT(GSTREAMER_1_0_VIDEO gstreamer-video-1.0 gstvideo-1.0)
|
||||
|
||||
# ------------------------------------------------
|
||||
# 3. Process the COMPONENTS passed to FIND_PACKAGE
|
||||
# ------------------------------------------------
|
||||
set(_GSTREAMER_1_0_REQUIRED_VARS
|
||||
Glib_INCLUDE_DIRS
|
||||
Glib_LIBRARIES
|
||||
GSTREAMER_1_0_INCLUDE_DIRS
|
||||
GSTREAMER_1_0_LIBRARIES
|
||||
VERSION_OK
|
||||
GSTREAMER_1_0_BASE_INCLUDE_DIRS
|
||||
GSTREAMER_1_0_BASE_LIBRARIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSTREAMER_1_0 DEFAULT_MSG GSTREAMER_1_0_LIBRARIES GSTREAMER_1_0_INCLUDE_DIRS)
|
||||
|
||||
list(APPEND GSTREAMER_1_0_INCLUDE_DIRS ${Glib_INCLUDE_DIRS})
|
||||
list(APPEND GSTREAMER_1_0_LIBRARIES ${Glib_LIBRARIES})
|
||||
list(APPEND GSTREAMER_1_0_INCLUDE_DIRS ${GSTREAMER_1_0_BASE_INCLUDE_DIRS})
|
||||
list(APPEND GSTREAMER_1_0_LIBRARIES ${GSTREAMER_1_0_BASE_LIBRARIES})
|
||||
list(APPEND GSTREAMER_1_0_INCLUDE_DIRS ${GSTREAMER_1_0_APP_INCLUDE_DIRS})
|
||||
list(APPEND GSTREAMER_1_0_LIBRARIES ${GSTREAMER_1_0_APP_LIBRARIES})
|
||||
list(APPEND GSTREAMER_1_0_INCLUDE_DIRS ${GSTREAMER_1_0_VIDEO_INCLUDE_DIRS})
|
||||
list(APPEND GSTREAMER_1_0_LIBRARIES ${GSTREAMER_1_0_VIDEO_LIBRARIES})
|
||||
|
||||
foreach (_component ${Gstreamer_FIND_COMPONENTS})
|
||||
set(_gst_component "GSTREAMER_1_0_${_component}")
|
||||
string(TOUPPER ${_gst_component} _UPPER_NAME)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(${_UPPER_NAME} DEFAULT_MSG ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
|
||||
list(APPEND GSTREAMER_1_0_INCLUDE_DIRS ${${_UPPER_NAME}_INCLUDE_DIRS})
|
||||
list(APPEND GSTREAMER_1_0_LIBRARIES ${${_UPPER_NAME}_LIBRARIES})
|
||||
endforeach ()
|
||||
|
||||
MARK_AS_ADVANCED(GSTREAMER_1_0_INCLUDE_DIRS GSTREAMER_1_0_LIBRARIES GSTREAMER_1_0_BASE_LIBRARY GSTREAMER_1_0_APP_LIBRARY)
|
||||
|
@ -1,42 +0,0 @@
|
||||
# - Try to find Glib-2.0 (with gobject)
|
||||
# Once done, this will define
|
||||
#
|
||||
# Glib_FOUND - system has Glib
|
||||
# Glib_INCLUDE_DIRS - the Glib include directories
|
||||
# Glib_LIBRARIES - link these to use Glib
|
||||
#
|
||||
# GLIB_ROOT_DIR - Primary search directory
|
||||
include(LibFindMacros)
|
||||
|
||||
# Use pkg-config to get hints about paths
|
||||
libfind_pkg_check_modules(Glib_PKGCONF glib-2.0)
|
||||
|
||||
# Main include dir
|
||||
find_path(Glib_INCLUDE_DIR
|
||||
NAMES glib.h
|
||||
PATHS ${Glib_PKGCONF_INCLUDE_DIRS} ${GLIB_ROOT_DIR}
|
||||
PATH_SUFFIXES glib-2.0
|
||||
)
|
||||
|
||||
# Finally the library itself
|
||||
find_library(Glib_LIBRARY
|
||||
NAMES glib-2.0 gstreamer_android
|
||||
PATHS ${Glib_PKGCONF_LIBRARY_DIRS} ${GLIB_ROOT_DIR}
|
||||
)
|
||||
find_library(Gobject_LIBRARY
|
||||
NAMES gobject-2.0 gstreamer_android
|
||||
PATHS ${Glib_PKGCONF_LIBRARY_DIRS} ${GLIB_ROOT_DIR}
|
||||
)
|
||||
|
||||
# Glib-related libraries also use a separate config header, which is relative to lib dir
|
||||
find_path(GlibConfig_INCLUDE_DIR
|
||||
NAMES glibconfig.h
|
||||
PATHS ${Glib_PKGCONF_INCLUDE_DIRS} ${GLIB_ROOT_DIR}
|
||||
)
|
||||
|
||||
# Set the include dir variables and the libraries and let libfind_process do the rest.
|
||||
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
|
||||
set(Glib_PROCESS_INCLUDES Glib_INCLUDE_DIR GlibConfig_INCLUDE_DIR)
|
||||
set(Glib_PROCESS_LIBS Glib_LIBRARY Gobject_LIBRARY)
|
||||
libfind_process(Glib)
|
||||
|
@ -1,237 +0,0 @@
|
||||
# - Find the ImageMagick binary suite.
|
||||
# This module will search for a set of ImageMagick tools specified
|
||||
# as components in the FIND_PACKAGE call. Typical components include,
|
||||
# but are not limited to (future versions of ImageMagick might have
|
||||
# additional components not listed here):
|
||||
#
|
||||
# animate
|
||||
# compare
|
||||
# composite
|
||||
# conjure
|
||||
# convert
|
||||
# display
|
||||
# identify
|
||||
# import
|
||||
# mogrify
|
||||
# montage
|
||||
# stream
|
||||
#
|
||||
# If no component is specified in the FIND_PACKAGE call, then it only
|
||||
# searches for the ImageMagick executable directory. This code defines
|
||||
# the following variables:
|
||||
#
|
||||
# ImageMagick_FOUND - TRUE if all components are found.
|
||||
# ImageMagick_EXECUTABLE_DIR - Full path to executables directory.
|
||||
# ImageMagick_<component>_FOUND - TRUE if <component> is found.
|
||||
# ImageMagick_<component>_EXECUTABLE - Full path to <component> executable.
|
||||
# ImageMagick_VERSION_STRING - the version of ImageMagick found
|
||||
# (since CMake 2.8.8)
|
||||
#
|
||||
# ImageMagick_VERSION_STRING will not work for old versions like 5.2.3.
|
||||
#
|
||||
# There are also components for the following ImageMagick APIs:
|
||||
#
|
||||
# Magick++
|
||||
# MagickWand
|
||||
# MagickCore
|
||||
#
|
||||
# For these components the following variables are set:
|
||||
#
|
||||
# ImageMagick_FOUND - TRUE if all components are found.
|
||||
# ImageMagick_INCLUDE_DIRS - Full paths to all include dirs.
|
||||
# ImageMagick_LIBRARIES - Full paths to all libraries.
|
||||
# ImageMagick_<component>_FOUND - TRUE if <component> is found.
|
||||
# ImageMagick_<component>_INCLUDE_DIRS - Full path to <component> include dirs.
|
||||
# ImageMagick_<component>_LIBRARIES - Full path to <component> libraries.
|
||||
#
|
||||
# Example Usages:
|
||||
# find_package(ImageMagick)
|
||||
# find_package(ImageMagick COMPONENTS convert)
|
||||
# find_package(ImageMagick COMPONENTS convert mogrify display)
|
||||
# find_package(ImageMagick COMPONENTS Magick++)
|
||||
# find_package(ImageMagick COMPONENTS Magick++ convert)
|
||||
#
|
||||
# Note that the standard FIND_PACKAGE features are supported
|
||||
# (i.e., QUIET, REQUIRED, etc.).
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
# Copyright 2007-2008 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org>
|
||||
# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Helper functions
|
||||
#---------------------------------------------------------------------
|
||||
function(FIND_IMAGEMAGICK_API component header)
|
||||
set(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
|
||||
|
||||
find_path(ImageMagick_${component}_INCLUDE_DIR
|
||||
NAMES ${header}
|
||||
PATHS
|
||||
${ImageMagick_INCLUDE_DIRS}
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
|
||||
PATH_SUFFIXES
|
||||
ImageMagick
|
||||
DOC "Path to the ImageMagick include dir."
|
||||
)
|
||||
find_library(ImageMagick_${component}_LIBRARY
|
||||
NAMES ${ARGN}
|
||||
PATHS
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib"
|
||||
DOC "Path to the ImageMagick Magick++ library."
|
||||
)
|
||||
|
||||
if(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
|
||||
set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
|
||||
|
||||
list(APPEND ImageMagick_INCLUDE_DIRS
|
||||
${ImageMagick_${component}_INCLUDE_DIR}
|
||||
)
|
||||
list(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
|
||||
set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
|
||||
list(APPEND ImageMagick_LIBRARIES
|
||||
${ImageMagick_${component}_LIBRARY}
|
||||
)
|
||||
set(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(FIND_IMAGEMAGICK_EXE component)
|
||||
set(_IMAGEMAGICK_EXECUTABLE
|
||||
${ImageMagick_EXECUTABLE_DIR}/${component}${CMAKE_EXECUTABLE_SUFFIX})
|
||||
if(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
|
||||
set(ImageMagick_${component}_EXECUTABLE
|
||||
${_IMAGEMAGICK_EXECUTABLE}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
|
||||
else()
|
||||
set(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Start Actual Work
|
||||
#---------------------------------------------------------------------
|
||||
# Try to find a ImageMagick installation binary path.
|
||||
find_path(ImageMagick_EXECUTABLE_DIR
|
||||
NAMES mogrify${CMAKE_EXECUTABLE_SUFFIX}
|
||||
PATHS
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]"
|
||||
DOC "Path to the ImageMagick binary directory."
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_path(ImageMagick_EXECUTABLE_DIR
|
||||
NAMES mogrify${CMAKE_EXECUTABLE_SUFFIX}
|
||||
)
|
||||
|
||||
# Find each component. Search for all tools in same dir
|
||||
# <ImageMagick_EXECUTABLE_DIR>; otherwise they should be found
|
||||
# independently and not in a cohesive module such as this one.
|
||||
unset(ImageMagick_REQUIRED_VARS)
|
||||
unset(ImageMagick_DEFAULT_EXECUTABLES)
|
||||
foreach(component ${ImageMagick_FIND_COMPONENTS}
|
||||
# DEPRECATED: forced components for backward compatibility
|
||||
convert mogrify import montage composite
|
||||
)
|
||||
if(component STREQUAL "Magick++")
|
||||
FIND_IMAGEMAGICK_API(Magick++ Magick++.h
|
||||
Magick++ CORE_RL_Magick++_ Magick++-Q16 Magick++-Q8
|
||||
)
|
||||
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
|
||||
elseif(component STREQUAL "MagickWand")
|
||||
FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
|
||||
Wand MagickWand CORE_RL_wand_ MagickWand-Q16 MagickWand-Q8
|
||||
)
|
||||
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
|
||||
elseif(component STREQUAL "MagickCore")
|
||||
FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
|
||||
Magick MagickCore CORE_RL_magick_ MagickCore-6 MagickCore-Q16 MagickCore-Q8
|
||||
)
|
||||
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
|
||||
else()
|
||||
if(ImageMagick_EXECUTABLE_DIR)
|
||||
FIND_IMAGEMAGICK_EXE(${component})
|
||||
endif()
|
||||
|
||||
if(ImageMagick_FIND_COMPONENTS)
|
||||
list(FIND ImageMagick_FIND_COMPONENTS ${component} is_requested)
|
||||
if(is_requested GREATER -1)
|
||||
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_${component}_EXECUTABLE)
|
||||
endif()
|
||||
elseif(ImageMagick_${component}_EXECUTABLE)
|
||||
# if no components were requested explicitly put all (default) executables
|
||||
# in the list
|
||||
list(APPEND ImageMagick_DEFAULT_EXECUTABLES ImageMagick_${component}_EXECUTABLE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT ImageMagick_FIND_COMPONENTS AND NOT ImageMagick_DEFAULT_EXECUTABLES)
|
||||
# No components were requested, and none of the default components were
|
||||
# found. Just insert mogrify into the list of the default components to
|
||||
# find so FPHSA below has something to check
|
||||
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_mogrify_EXECUTABLE)
|
||||
elseif(ImageMagick_DEFAULT_EXECUTABLES)
|
||||
list(APPEND ImageMagick_REQUIRED_VARS ${ImageMagick_DEFAULT_EXECUTABLES})
|
||||
endif()
|
||||
|
||||
set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS})
|
||||
set(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES})
|
||||
|
||||
if(ImageMagick_mogrify_EXECUTABLE)
|
||||
execute_process(COMMAND ${ImageMagick_mogrify_EXECUTABLE} -version
|
||||
OUTPUT_VARIABLE imagemagick_version
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(imagemagick_version MATCHES "^Version: ImageMagick [0-9]")
|
||||
string(REGEX REPLACE "^Version: ImageMagick ([-0-9\\.]+).*" "\\1" ImageMagick_VERSION_STRING "${imagemagick_version}")
|
||||
endif()
|
||||
unset(imagemagick_version)
|
||||
endif()
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Standard Package Output
|
||||
#---------------------------------------------------------------------
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ImageMagick
|
||||
REQUIRED_VARS ${ImageMagick_REQUIRED_VARS}
|
||||
VERSION_VAR ImageMagick_VERSION_STRING
|
||||
)
|
||||
# Maintain consistency with all other variables.
|
||||
set(ImageMagick_FOUND ${IMAGEMAGICK_FOUND})
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# DEPRECATED: Setting variables for backward compatibility.
|
||||
#---------------------------------------------------------------------
|
||||
set(IMAGEMAGICK_BINARY_PATH ${ImageMagick_EXECUTABLE_DIR}
|
||||
CACHE PATH "Path to the ImageMagick binary directory.")
|
||||
set(IMAGEMAGICK_CONVERT_EXECUTABLE ${ImageMagick_convert_EXECUTABLE}
|
||||
CACHE FILEPATH "Path to ImageMagick's convert executable.")
|
||||
set(IMAGEMAGICK_MOGRIFY_EXECUTABLE ${ImageMagick_mogrify_EXECUTABLE}
|
||||
CACHE FILEPATH "Path to ImageMagick's mogrify executable.")
|
||||
set(IMAGEMAGICK_IMPORT_EXECUTABLE ${ImageMagick_import_EXECUTABLE}
|
||||
CACHE FILEPATH "Path to ImageMagick's import executable.")
|
||||
set(IMAGEMAGICK_MONTAGE_EXECUTABLE ${ImageMagick_montage_EXECUTABLE}
|
||||
CACHE FILEPATH "Path to ImageMagick's montage executable.")
|
||||
set(IMAGEMAGICK_COMPOSITE_EXECUTABLE ${ImageMagick_composite_EXECUTABLE}
|
||||
CACHE FILEPATH "Path to ImageMagick's composite executable.")
|
||||
mark_as_advanced(
|
||||
IMAGEMAGICK_BINARY_PATH
|
||||
IMAGEMAGICK_CONVERT_EXECUTABLE
|
||||
IMAGEMAGICK_MOGRIFY_EXECUTABLE
|
||||
IMAGEMAGICK_IMPORT_EXECUTABLE
|
||||
IMAGEMAGICK_MONTAGE_EXECUTABLE
|
||||
IMAGEMAGICK_COMPOSITE_EXECUTABLE
|
||||
)
|
@ -1,53 +0,0 @@
|
||||
# razor-de: Configure libudev environment
|
||||
#
|
||||
# UDEV_FOUND - system has a libudev
|
||||
# UDEV_INCLUDE_DIR - where to find header files
|
||||
# UDEV_LIBRARIES - the libraries to link against udev
|
||||
# UDEV_STABLE - it's true when is the version greater or equals to 143 - version when the libudev was stabilized in its API
|
||||
#
|
||||
# copyright (c) 2011 Petr Vanek <petr@scribus.info>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
#
|
||||
|
||||
FIND_PATH(
|
||||
UDEV_INCLUDE_DIR
|
||||
libudev.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
${UDEV_PATH_INCLUDES}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
UDEV_LIBRARIES
|
||||
NAMES udev libudev
|
||||
PATHS
|
||||
/usr/lib${LIB_SUFFIX}
|
||||
/usr/local/lib${LIB_SUFFIX}
|
||||
${UDEV_PATH_LIB}
|
||||
)
|
||||
|
||||
IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
|
||||
SET(UDEV_FOUND "YES")
|
||||
execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE)
|
||||
# retvale is 0 of the condition is "true" so we need to negate the value...
|
||||
if (UDEV_STABLE)
|
||||
set(UDEV_STABLE 0)
|
||||
else (UDEV_STABLE)
|
||||
set(UDEV_STABLE 1)
|
||||
endif (UDEV_STABLE)
|
||||
message(STATUS "libudev stable: ${UDEV_STABLE}")
|
||||
ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
|
||||
|
||||
IF (UDEV_FOUND)
|
||||
MESSAGE(STATUS "Found UDev: ${UDEV_LIBRARIES}")
|
||||
MESSAGE(STATUS " include: ${UDEV_INCLUDE_DIR}")
|
||||
ELSE (UDEV_FOUND)
|
||||
MESSAGE(STATUS "UDev not found.")
|
||||
MESSAGE(STATUS "UDev: You can specify includes: -DUDEV_PATH_INCLUDES=/opt/udev/include")
|
||||
MESSAGE(STATUS " currently found includes: ${UDEV_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS "UDev: You can specify libs: -DUDEV_PATH_LIB=/opt/udev/lib")
|
||||
MESSAGE(STATUS " currently found libs: ${UDEV_LIBRARIES}")
|
||||
IF (UDev_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find UDev library")
|
||||
ENDIF (UDev_FIND_REQUIRED)
|
||||
ENDIF (UDEV_FOUND)
|
@ -1,116 +0,0 @@
|
||||
# - Try to find UUID
|
||||
# Once done this will define
|
||||
#
|
||||
# UUID_FOUND - system has UUID
|
||||
# UUID_INCLUDE_DIRS - the UUID include directory
|
||||
# UUID_LIBRARIES - Link these to use UUID
|
||||
# UUID_DEFINITIONS - Compiler switches required for using UUID
|
||||
#
|
||||
# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
|
||||
if (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(UUID_FOUND TRUE)
|
||||
else (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
|
||||
find_path(UUID_INCLUDE_DIR
|
||||
NAMES
|
||||
uuid.h
|
||||
PATH_SUFFIXES
|
||||
uuid
|
||||
HINTS
|
||||
${UUID_DIR}/include
|
||||
$ENV{UUID_DIR}/include
|
||||
$ENV{UUID_DIR}
|
||||
${DELTA3D_EXT_DIR}/inc
|
||||
$ENV{DELTA_ROOT}/ext/inc
|
||||
$ENV{DELTA_ROOT}
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/usr/include/gdal
|
||||
/sw/include # Fink
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/include
|
||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||
/usr/freeware/include
|
||||
)
|
||||
|
||||
find_library(UUID_LIBRARY
|
||||
NAMES
|
||||
uuid ossp-uuid
|
||||
HINTS
|
||||
${UUID_DIR}/lib
|
||||
$ENV{UUID_DIR}/lib
|
||||
$ENV{UUID_DIR}
|
||||
${DELTA3D_EXT_DIR}/lib
|
||||
$ENV{DELTA_ROOT}/ext/lib
|
||||
$ENV{DELTA_ROOT}
|
||||
$ENV{OSG_ROOT}/lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/sw/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
find_library(UUID_LIBRARY_DEBUG
|
||||
NAMES
|
||||
uuidd
|
||||
HINTS
|
||||
${UUID_DIR}/lib
|
||||
$ENV{UUID_DIR}/lib
|
||||
$ENV{UUID_DIR}
|
||||
${DELTA3D_EXT_DIR}/lib
|
||||
$ENV{DELTA_ROOT}/ext/lib
|
||||
$ENV{DELTA_ROOT}
|
||||
$ENV{OSG_ROOT}/lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/sw/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
if (NOT UUID_LIBRARY AND BSD)
|
||||
set(UUID_LIBRARY "")
|
||||
endif(NOT UUID_LIBRARY AND BSD)
|
||||
|
||||
set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
|
||||
set(UUID_LIBRARIES ${UUID_LIBRARY})
|
||||
|
||||
if (UUID_INCLUDE_DIRS)
|
||||
if (BSD OR UUID_LIBRARIES)
|
||||
set(UUID_FOUND TRUE)
|
||||
endif (BSD OR UUID_LIBRARIES)
|
||||
endif (UUID_INCLUDE_DIRS)
|
||||
|
||||
if (UUID_FOUND)
|
||||
if (NOT UUID_FIND_QUIETLY)
|
||||
message(STATUS "Found UUID: ${UUID_LIBRARIES}")
|
||||
endif (NOT UUID_FIND_QUIETLY)
|
||||
else (UUID_FOUND)
|
||||
if (UUID_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find UUID")
|
||||
endif (UUID_FIND_REQUIRED)
|
||||
endif (UUID_FOUND)
|
||||
|
||||
# show the UUID_INCLUDE_DIRS and UUID_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(UUID_INCLUDE_DIRS UUID_LIBRARIES)
|
||||
|
||||
endif (UUID_LIBRARIES AND UUID_INCLUDE_DIRS)
|
Loading…
Reference in New Issue
Block a user