Warning, /network/ruqola/cmake/modules/Findo2.cmake is written in an unsupported language. File is not indexed.

0001 # Cmake macro to detect o2 libraries
0002 #
0003 # This module defines
0004 #  o2_FOUND          - True if libo2 is detected.
0005 #  o2_INCLUDE_DIRS   - Path to libo2 header files.
0006 #  o2_LIBRARIES      - Libraries to link against to use libo2.
0007 #  o2_VERSION_STRING - e.g. "2.4.14"
0008 #  o2_VERSION_MAJOR  - e.g. "2"
0009 #  o2_VERSION_MINOR  - e.g. "4"
0010 #  o2_VERSION_PATCH  - e.g. "14"
0011 #
0012 #
0013 
0014 
0015 set(o2_FIND_REQUIRED ${o2_FIND_REQUIRED})
0016 
0017 find_path(o2_INCLUDE_DIRS o2/o2.h)
0018 
0019 set(o2_NAMES      ${o2_NAMES}      o2      libo2)
0020 
0021 find_library(o2_LIBRARY
0022         NAMES ${o2_NAMES} 
0023         ) 
0024 
0025 
0026 # Detect libo2 version
0027 
0028 find_package(PkgConfig)
0029 pkg_check_modules(PC_o2 QUIET libo2)
0030 
0031 if(PC_o2_FOUND)
0032 
0033     set(o2_VERSION_STRING "${PC_o2_VERSION}")
0034 
0035 endif()
0036 
0037 # handle the QUIETLY and REQUIRED arguments and set o2_FOUND to TRUE if
0038 # all listed variables are TRUE
0039 
0040 include(FindPackageHandleStandardArgs)
0041 find_package_handle_standard_args(o2 DEFAULT_MSG
0042                                   o2_LIBRARY
0043                                   o2_INCLUDE_DIRS)
0044 
0045 if(o2_FOUND)
0046     set(o2_INCLUDE_DIRS ${o2_INCLUDE_DIRS}/o2)
0047     set(o2_LIBRARIES    ${o2_LIBRARY} )
0048 endif()
0049 
0050 message(STATUS "libo2 found    : ${o2_FOUND}")
0051 message(STATUS "libo2 version  : ${o2_VERSION_STRING}")
0052 message(STATUS "libo2 includes : ${o2_INCLUDE_DIRS}")
0053 message(STATUS "libo2 libraries: ${o2_LIBRARIES}")