Torque3D/Tools/CMake/finders/FindVorbis.cmake
2025-03-14 14:31:11 +00:00

13 lines
No EOL
445 B
CMake

if(TARGET vorbis)
set(VORBIS_FOUND TRUE)
set(VORBIS_INCLUDE_DIRS $<TARGET_PROPERTY:vorbis,INTERFACE_INCLUDE_DIRECTORIES>)
set(VORBIS_LIBRARIES vorbis)
# Provide an alias for consistency with modern CMake
if(NOT TARGET VORBIS::VORBIS)
add_library(VORBIS::VORBIS ALIAS vorbis)
endif()
else()
set(VORBIS_FOUND FALSE)
message(FATAL_ERROR "Vorbis was not added with add_subdirectory before calling find_package(Vorbis).")
endif()