Blame view

ios/cocos2d/cmake/Modules/FindVorbis.cmake 1.18 KB
520389e3   xiaoyu   接入cocos源码,编译未通过,继续修改
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  # - Find vorbis
  # Find the native vorbis includes and libraries
  #
  #  VORBIS_INCLUDE_DIRS - where to find vorbis.h, etc.
  #  VORBIS_LIBRARIES    - List of libraries when using vorbis(file).
  #  VORBIS_FOUND        - True if vorbis found.
  
  find_package(Ogg)
  if(OGG_FOUND)
  	find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
  	# MSVC built vorbis may be named vorbis_static
  	# The provided project files name the library with the lib prefix.
  	find_library(VORBIS_LIBRARY NAMES vorbis vorbis_static libvorbis libvorbis_static)
  	find_library(VORBISFILE_LIBRARY NAMES vorbisfile vorbisfile_static libvorbisfile libvorbisfile_static)
  	# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
  	# to TRUE if all listed variables are TRUE.
  	include(FindPackageHandleStandardArgs)
  	find_package_handle_standard_args(VORBIS DEFAULT_MSG VORBIS_INCLUDE_DIR VORBIS_LIBRARY VORBISFILE_LIBRARY)
  endif(OGG_FOUND)
  
  if(VORBIS_FOUND)
    set(VORBIS_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR})
    set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY})
  else(VORBIS_FOUND)
    set(VORBIS_INCLUDE_DIRS)
    set(VORBIS_LIBRARIES)
  endif(VORBIS_FOUND)
  
  mark_as_advanced(VORBIS_INCLUDE_DIR VORBIS_LIBRARY VORBISFILE_LIBRARY)