VirtualBox

source: vbox/trunk/src/libs/libvorbis-1.3.7/cmake/FindOgg.cmake@ 98827

最後變更 在這個檔案從98827是 96468,由 vboxsync 提交於 2 年 前

libs/libvorbis-1.3.7: Re-exporting, hopefully this time everything is there. bugref:10275

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.1 KB
 
1#[=======================================================================[.rst:
2
3FindOgg
4--------
5
6Find the native Ogg includes and library.
7
8IMPORTED Targets
9^^^^^^^^^^^^^^^^
10
11This module defines :prop_tgt:`IMPORTED` target ``Ogg::ogg``, if
12Ogg has been found.
13
14Result Variables
15^^^^^^^^^^^^^^^^
16
17This module defines the following variables:
18
19::
20
21 OGG_INCLUDE_DIRS - where to find ogg.h, etc.
22 OGG_LIBRARIES - List of libraries when using ogg.
23 OGG_FOUND - True if ogg found.
24
25::
26
27 OGG_VERSION_STRING - The version of ogg found (x.y.z)
28
29Hints
30^^^^^
31
32A user may set ``OGG_ROOT`` to a ogg installation root to tell this
33module where to look.
34#]=======================================================================]
35
36if(OGG_INCLUDE_DIR)
37 # Already in cache, be silent
38 set(OGG_FIND_QUIETLY TRUE)
39endif()
40
41find_package(PkgConfig QUIET)
42pkg_check_modules(PC_OGG QUIET ogg)
43
44set(OGG_VERSION_STRING ${PC_OGG_VERSION})
45
46find_path(OGG_INCLUDE_DIR ogg/ogg.h
47 HINTS
48 ${PC_OGG_INCLUDEDIR}
49 ${PC_OGG_INCLUDE_DIRS}
50 ${OGG_ROOT}
51 PATH_SUFFIXES
52 include
53)
54# MSVC built ogg may be named ogg_static.
55# The provided project files name the library with the lib prefix.
56find_library(OGG_LIBRARY
57 NAMES
58 ogg
59 ogg_static
60 libogg
61 libogg_static
62 HINTS
63 ${PC_OGG_LIBDIR}
64 ${PC_OGG_LIBRARY_DIRS}
65 ${OGG_ROOT}
66 PATH_SUFFIXES
67 lib
68)
69
70# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
71# to TRUE if all listed variables are TRUE.
72include(FindPackageHandleStandardArgs)
73find_package_handle_standard_args(Ogg
74 REQUIRED_VARS
75 OGG_LIBRARY
76 OGG_INCLUDE_DIR
77 VERSION_VAR
78 OGG_VERSION_STRING
79)
80
81if(OGG_FOUND)
82 set(OGG_LIBRARIES ${OGG_LIBRARY})
83 set(OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
84
85 if(NOT TARGET Ogg::ogg)
86 add_library(Ogg::ogg UNKNOWN IMPORTED)
87 set_target_properties(Ogg::ogg PROPERTIES
88 INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}"
89 IMPORTED_LOCATION "${OGG_LIBRARIES}"
90 )
91 endif()
92endif()
93
94mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY)
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette