source: calamares/trunk/fuentes/CMakeModules/FindYAMLCPP.cmake @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.8 KB
Line 
1# Locate yaml-cpp
2#
3# This module defines
4#  YAMLCPP_FOUND, if false, do not try to link to yaml-cpp
5#  YAMLCPP_LIBRARY, where to find yaml-cpp
6#  YAMLCPP_INCLUDE_DIR, where to find yaml.h
7#
8# By default, the dynamic libraries of yaml-cpp will be found. To find the static ones instead,
9# you must set the YAMLCPP_STATIC_LIBRARY variable to TRUE before calling find_package(YamlCpp ...).
10#
11# If yaml-cpp is not installed in a standard path, you can use the YAMLCPP_DIR CMake variable
12# to tell CMake where yaml-cpp is.
13
14# attempt to find static library first if this is set
15if(YAMLCPP_STATIC_LIBRARY)
16    set(YAMLCPP_STATIC libyaml-cpp.a)
17endif()
18
19# find the yaml-cpp include directory
20find_path(YAMLCPP_INCLUDE_DIR yaml-cpp/yaml.h
21          PATH_SUFFIXES include
22          PATHS
23          ~/Library/Frameworks/yaml-cpp/include/
24          /Library/Frameworks/yaml-cpp/include/
25          /usr/local/include/
26          /usr/include/
27          /sw/yaml-cpp/         # Fink
28          /opt/local/yaml-cpp/  # DarwinPorts
29          /opt/csw/yaml-cpp/    # Blastwave
30          /opt/yaml-cpp/
31          ${YAMLCPP_DIR}/include/)
32
33# find the yaml-cpp library
34find_library(YAMLCPP_LIBRARY
35             NAMES ${YAMLCPP_STATIC} yaml-cpp
36             PATH_SUFFIXES lib64 lib
37             PATHS ~/Library/Frameworks
38                    /Library/Frameworks
39                    /usr/local
40                    /usr
41                    /sw
42                    /opt/local
43                    /opt/csw
44                    /opt
45                    ${YAMLCPP_DIR}/lib)
46
47# handle the QUIETLY and REQUIRED arguments and set YAMLCPP_FOUND to TRUE if all listed variables are TRUE
48include(FindPackageHandleStandardArgs)
49FIND_PACKAGE_HANDLE_STANDARD_ARGS(YAMLCPP DEFAULT_MSG YAMLCPP_INCLUDE_DIR YAMLCPP_LIBRARY)
50mark_as_advanced(YAMLCPP_INCLUDE_DIR YAMLCPP_LIBRARY)
Note: See TracBrowser for help on using the repository browser.