diff options
author | sanine <sanine.not@pm.me> | 2022-10-12 12:03:23 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-10-12 12:03:23 -0500 |
commit | 530ffd0b7d3c39757b20f00716e486b5caf89aff (patch) | |
tree | 76b35fdf57317038acf6b828871f6ae25fce2ebe /libs/cairo-1.16.0/cmake | |
parent | 3dbe9332e47c143a237db12440f134caebd1cfbe (diff) |
add cairo
Diffstat (limited to 'libs/cairo-1.16.0/cmake')
-rw-r--r-- | libs/cairo-1.16.0/cmake/FindFontconfig.cmake | 76 | ||||
-rw-r--r-- | libs/cairo-1.16.0/cmake/FindPixman.cmake | 99 |
2 files changed, 175 insertions, 0 deletions
diff --git a/libs/cairo-1.16.0/cmake/FindFontconfig.cmake b/libs/cairo-1.16.0/cmake/FindFontconfig.cmake new file mode 100644 index 0000000..bfd0a2c --- /dev/null +++ b/libs/cairo-1.16.0/cmake/FindFontconfig.cmake @@ -0,0 +1,76 @@ +# - Try to find FONTCONFIG +# Once done this will define +# +# FONTCONFIG_ROOT_DIR - Set this variable to the root installation of FONTCONFIG +# FONTCONFIG_FOUND - system has FONTCONFIG +# FONTCONFIG_INCLUDE_DIRS - the FONTCONFIG include directory +# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG +# +# Copyright (c) 2008 Joshua L. Blocher <verbalshadow at gmail dot com> +# Copyright (c) 2012 Dmitry Baryshnikov <polimax at mail dot ru> +# Copyright (c) 2013 Michael Pavlyshko <pavlushko at tut dot by> +# +# Distributed under the OSI-approved BSD License +# + +if (NOT WIN32) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(_FONTCONFIG fontconfig) + endif (PKG_CONFIG_FOUND) +endif (NOT WIN32) + +SET(_FONTCONFIG_ROOT_HINTS + $ENV{FONTCONFIG} + ${CMAKE_FIND_ROOT_PATH} + ${FONTCONFIG_ROOT_DIR} +) + +SET(_FONTCONFIG_ROOT_PATHS + $ENV{FONTCONFIG}/src + /usr + /usr/local +) + +SET(_FONTCONFIG_ROOT_HINTS_AND_PATHS + HINTS ${_FONTCONFIG_ROOT_HINTS} + PATHS ${_FONTCONFIG_ROOT_PATHS} +) + +FIND_PATH(FONTCONFIG_INCLUDE_DIR + NAMES + "fontconfig/fontconfig.h" + HINTS + ${_FONTCONFIG_INCLUDEDIR} + ${_FONTCONFIG_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + include +) + + +FIND_LIBRARY(FONTCONFIG_LIBRARY + NAMES + fontconfig + HINTS + ${_FONTCONFIG_LIBDIR} + ${_FONTCONFIG_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "local/lib" +) + +SET(FONTCONFIG_LIBRARIES + ${FONTCONFIG_LIBRARY} +) + +SET(FONTCONFIG_INCLUDE_DIRS + ${FONTCONFIG_INCLUDE_DIR} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(FONTCONFIG + REQUIRED_VARS FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIRS + FAIL_MESSAGE "Could NOT find FONTCONFIG, try to set the path to FONTCONFIG root folder in the system variable FONTCONFIG" +) + +MARK_AS_ADVANCED(FONTCONFIG_INCLUDE_DIR FONTCONFIG_INCLUDE_DIRS FONTCONFIG_LIBRARY FONTCONFIG_LIBRARIES)
\ No newline at end of file diff --git a/libs/cairo-1.16.0/cmake/FindPixman.cmake b/libs/cairo-1.16.0/cmake/FindPixman.cmake new file mode 100644 index 0000000..05da031 --- /dev/null +++ b/libs/cairo-1.16.0/cmake/FindPixman.cmake @@ -0,0 +1,99 @@ +# - Try to find PIXMAN +# Once done this will define +# +# PIXMAN_ROOT_DIR - Set this variable to the root installation of PIXMAN +# PIXMAN_FOUND - system has PIXMAN +# PIXMAN_INCLUDE_DIRS - the PIXMAN include directory +# PIXMAN_LIBRARIES - Link these to use PIXMAN +# +# Copyright (c) 2008 Joshua L. Blocher <verbalshadow at gmail dot com> +# Copyright (c) 2011 Ralf Habacker, <ralf dot habacker at freenet dot de> +# Copyright (c) 2012 Dmitry Baryshnikov <polimax at mail dot ru> +# Copyright (c) 2015 Mikhail Paulyshka <pavlyshko-m at yandex dot by> +# +# Distributed under the OSI-approved BSD License +# + +if (NOT WIN32) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(_PIXMAN pixman) + SET(PIXMAN_VERSION ${_PIXMAN_VERSION}) + endif (PKG_CONFIG_FOUND) +endif (NOT WIN32) + +SET(_PIXMAN_ROOT_HINTS + $ENV{PIXMAN} + ${CMAKE_FIND_ROOT_PATH} + ${PIXMAN_ROOT_DIR} +) + +SET(_PIXMAN_ROOT_PATHS + $ENV{PIXMAN}/src + /usr + /usr/local +) + +SET(_PIXMAN_ROOT_HINTS_AND_PATHS + HINTS ${_PIXMAN_ROOT_HINTS} + PATHS ${_PIXMAN_ROOT_PATHS} +) + +FIND_PATH(PIXMAN_INCLUDE_DIR + NAMES + "pixman.h" + HINTS + ${_PIXMAN_INCLUDEDIR} + ${_PIXMAN_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + include + "include/pixman-1" +) + +FIND_LIBRARY(PIXMAN_LIBRARY + NAMES + pixman-1 + pixman-1d + pixman-1_static + pixman-1_staticd + HINTS + ${_PIXMAN_LIBDIR} + ${_PIXMAN_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "local/lib" +) + +SET(PIXMAN_LIBRARIES + ${PIXMAN_LIBRARY} +) + +SET(PIXMAN_INCLUDE_DIRS + ${PIXMAN_INCLUDE_DIR} +) + +if (NOT PIXMAN_VERSION) + if (EXISTS "${PIXMAN_INCLUDE_DIRS}/pixman-version.h") + file(READ "${PIXMAN_INCLUDE_DIRS}/pixman-version.h" PIXMAN_VERSION_CONTENT) + + string(REGEX MATCH "#define +PIXMAN_VERSION_MAJOR +([0-9]+)" _dummy "${PIXMAN_VERSION_CONTENT}") + set(PIXMAN_VERSION_MAJOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +PIXMAN_VERSION_MINOR +([0-9]+)" _dummy "${PIXMAN_VERSION_CONTENT}") + set(PIXMAN_VERSION_MINOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +PIXMAN_VERSION_MICRO +([0-9]+)" _dummy "${PIXMAN_VERSION_CONTENT}") + set(PIXMAN_VERSION_MICRO "${CMAKE_MATCH_1}") + + set(PIXMAN_VERSION "${PIXMAN_VERSION_MAJOR}.${PIXMAN_VERSION_MINOR}.${PIXMAN_VERSION_MICRO}") + endif (EXISTS "${PIXMAN_INCLUDE_DIRS}/pixman-version.h") +endif(NOT PIXMAN_VERSION) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(PIXMAN + REQUIRED_VARS PIXMAN_LIBRARIES PIXMAN_INCLUDE_DIRS + VERSION_VAR PIXMAN_VERSION + FAIL_MESSAGE "Could NOT find PIXMAN, try to set the path to PIXMAN root folder in the system variable PIXMAN" +) + +MARK_AS_ADVANCED(PIXMAN_CONFIG_INCLUDE_DIR PIXMAN_INCLUDE_DIR PIXMAN_INCLUDE_DIRS PIXMAN_LIBRARY PIXMAN_LIBRARIES)
\ No newline at end of file |