FindOGG.cmake 662 B

1234567891011121314151617181920212223242526
  1. find_path(OGG_INCLUDE_DIR
  2. NAMES
  3. ogg/ogg.h
  4. DOC "ogg include directory")
  5. mark_as_advanced(OGG_INCLUDE_DIR)
  6. find_library(OGG_LIBRARY
  7. NAMES
  8. ogg
  9. DOC "ogg library")
  10. mark_as_advanced(OGG_LIBRARY)
  11. include(FindPackageHandleStandardArgs)
  12. find_package_handle_standard_args(OGG REQUIRED_VARS OGG_LIBRARY OGG_INCLUDE_DIR)
  13. if (OGG_FOUND)
  14. set(OGG_LIBRARIES "${OGG_LIBRRAY}")
  15. set(OGG_INCLUDE_DIRS "${OGG_INCLUDE_DIR}")
  16. if (NOT TARGET OGG::OGG)
  17. add_library(OGG::OGG UNKNOWN IMPORTED)
  18. set_target_properties(OGG::OGG PROPERTIES
  19. IMPORTED_LOCATION "${OGG_LIBRARY}"
  20. INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}")
  21. endif ()
  22. endif ()