diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
commit | 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch) | |
tree | ed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/Audio.cmake | |
parent | 7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff) |
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore
include directories and link libraries in consumer projects.
Diffstat (limited to 'indra/cmake/Audio.cmake')
-rw-r--r-- | indra/cmake/Audio.cmake | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index f95439245a..bc11e62de5 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -1,6 +1,11 @@ # -*- cmake -*- include(Prebuilt) +if(TARGET vorbis::vorbis) + return() +endif() +create_target(vorbis::vorbis) + if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(OGG REQUIRED ogg) @@ -9,34 +14,12 @@ if (USESYSTEMLIBS) 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}) + set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include ) 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) + set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static ) else (WINDOWS) - set(OGG_LIBRARIES ogg) - set(VORBIS_LIBRARIES vorbis) - set(VORBISENC_LIBRARIES vorbisenc) - set(VORBISFILE_LIBRARIES vorbisfile) + set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile ) endif (WINDOWS) endif (USESYSTEMLIBS) -link_directories( - ${VORBIS_LIBRARY_DIRS} - ${VORBISENC_LIBRARY_DIRS} - ${VORBISFILE_LIBRARY_DIRS} - ${OGG_LIBRARY_DIRS} - ) |