Commit 1a909167 authored by evpobr's avatar evpobr
Browse files

Export CMake targets to the build tree

Properly export Vorbis targets when added via `add_subdirectory`.
parent 4a767c9e
Pipeline #2210 passed with stage
in 1 minute and 45 seconds
......@@ -78,6 +78,10 @@ if (NOT BUILD_FRAMEWORK)
add_library(vorbisenc ${VORBISENC_SOURCES})
add_library(vorbisfile ${VORBISFILE_SOURCES})
add_library(Vorbis::vorbis ALIAS vorbis)
add_library(Vorbis::vorbisenc ALIAS vorbisenc)
add_library(Vorbis::vorbisfile ALIAS vorbisfile)
get_version_info(VORBIS_VERSION_INFO "V_LIB_CURRENT" "V_LIB_AGE" "V_LIB_REVISION")
set_target_properties(vorbis PROPERTIES SOVERSION ${VORBIS_VERSION_INFO})
get_version_info(VORBISENC_VERSION_INFO "VE_LIB_CURRENT" "VE_LIB_AGE" "VE_LIB_REVISION")
......@@ -121,6 +125,7 @@ if (NOT BUILD_FRAMEWORK)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
export(EXPORT VorbisTargets NAMESPACE Vorbis:: FILE VorbisTargets.cmake)
if(INSTALL_CMAKE_PACKAGE_MODULE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment