Export CMake configuration

This will install a <libdir>/cmake/taglib/ folder with CMake
configuration, so that users can simply use

find_package(TagLib)
add_executable(myproject ...)
target_link_libraries(myproject TagLib::tag)
This commit is contained in:
Urs Fleisch
2023-11-12 16:01:55 +01:00
parent 16326b2479
commit faddc4aa06
4 changed files with 57 additions and 4 deletions

12
taglib-config.cmake.in Normal file
View File

@ -0,0 +1,12 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/taglib-targets.cmake")
set(TAGLIB_FOUND ${TagLib_FOUND})
set(TAGLIB_VERSION ${TagLib_VERSION})
check_required_components("TagLib")
if(NOT TARGET TagLib::TagLib)
add_library(TagLib::TagLib ALIAS TagLib::tag)
endif()