diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-03-31 11:39:06 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-03-31 11:39:06 -0400 |
commit | 1be9d68468e51be7de5b632f0276dc6708e75dc6 (patch) | |
tree | ba80104fa9531a51291d2ad067b23fa75cb58fc9 /indra/cmake/Audio.cmake | |
parent | 0dd7b362a6e77d8f3dff450376ddf2d4ffaf752c (diff) | |
parent | c7053a6928fd5eafdc935453742e92951ae4e0c1 (diff) |
DRTVWR-573: Merge branch 'main' into fix-monterey
Diffstat (limited to 'indra/cmake/Audio.cmake')
-rw-r--r-- | indra/cmake/Audio.cmake | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index f95439245a..38547bb017 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -1,42 +1,16 @@ # -*- cmake -*- include(Prebuilt) -if (USESYSTEMLIBS) - include(FindPkgConfig) - pkg_check_modules(OGG REQUIRED ogg) - pkg_check_modules(VORBIS REQUIRED vorbis) - pkg_check_modules(VORBISENC REQUIRED vorbisenc) - pkg_check_modules(VORBISFILE REQUIRED vorbisfile) -else (USESYSTEMLIBS) - use_prebuilt_binary(ogg_vorbis) - set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) - set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS}) - set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS}) +include_guard() +add_library( ll::vorbis INTERFACE IMPORTED ) - if (WINDOWS) - set(OGG_LIBRARIES - optimized ogg_static - debug ogg_static_d) - set(VORBIS_LIBRARIES - optimized vorbis_static - debug vorbis_static_d) - set(VORBISENC_LIBRARIES - optimized vorbisenc_static - debug vorbisenc_static_d) - set(VORBISFILE_LIBRARIES - optimized vorbisfile_static - debug vorbisfile_static_d) - else (WINDOWS) - set(OGG_LIBRARIES ogg) - set(VORBIS_LIBRARIES vorbis) - set(VORBISENC_LIBRARIES vorbisenc) - set(VORBISFILE_LIBRARIES vorbisfile) - endif (WINDOWS) -endif (USESYSTEMLIBS) +use_system_binary(vorbis) +use_prebuilt_binary(ogg_vorbis) +target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) + +if (WINDOWS) + target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static ) +else (WINDOWS) + target_link_libraries(ll::vorbis INTERFACE ogg vorbis vorbisenc vorbisfile ) +endif (WINDOWS) -link_directories( - ${VORBIS_LIBRARY_DIRS} - ${VORBISENC_LIBRARY_DIRS} - ${VORBISFILE_LIBRARY_DIRS} - ${OGG_LIBRARY_DIRS} - ) |