Merge pull request #40 from McSinyx/travis
[alure.git] / cmake / FindOgg.cmake
blob701ca26ea68bab2b391e55de7cfd3afdfc805c67
1 # - FindOgg.cmake
2 # Find the native ogg includes and libraries
4 # OGG_INCLUDE_DIRS - where to find ogg/ogg.h, etc.
5 # OGG_LIBRARIES - List of libraries when using ogg.
6 # OGG_FOUND - True if ogg found.
8 if(OGG_INCLUDE_DIR AND OGG_LIBRARY)
9     # Already in cache, be silent
10     set(OGG_FIND_QUIETLY TRUE)
11 endif(OGG_INCLUDE_DIR AND OGG_LIBRARY)
13 find_path(OGG_INCLUDE_DIR ogg/ogg.h)
15 # MSVC built ogg may be named ogg_static.
16 # The provided project files name the library with the lib prefix.
17 find_library(OGG_LIBRARY NAMES ogg ogg_static libogg libogg_static)
19 # Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
20 # to TRUE if all listed variables are TRUE.
21 include(FindPackageHandleStandardArgs)
22 find_package_handle_standard_args(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)
24 if(OGG_FOUND)
25     set(OGG_LIBRARIES ${OGG_LIBRARY})
26     set(OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
27 endif(OGG_FOUND)