aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2023-09-24 13:08:14 +1000
committerfuzzard <fuzzard@kodi.tv>2023-09-24 13:08:14 +1000
commita10c47764b42de2b8434e134fe56b60edec9ac0e (patch)
treebb410d9d93c7b82b2bb5795f4fb744e837bbd5b2 /cmake
parentb1b267a6ef6416bf3910044080621255064c39d7 (diff)
[cmake] FindTagLib add to multigen build_internal_depends target
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindTagLib.cmake24
1 files changed, 14 insertions, 10 deletions
diff --git a/cmake/modules/FindTagLib.cmake b/cmake/modules/FindTagLib.cmake
index 311d9e7ef8..158b7b2e44 100644
--- a/cmake/modules/FindTagLib.cmake
+++ b/cmake/modules/FindTagLib.cmake
@@ -112,20 +112,24 @@ if(NOT TARGET TagLib::TagLib)
if(TARGET taglib)
add_dependencies(TagLib::TagLib taglib)
- else()
- # Add internal build target when a Multi Config Generator is used
- # We cant add a dependency based off a generator expression for targeted build types,
- # https://gitlab.kitware.com/cmake/cmake/-/issues/19467
- # therefore if the find heuristics only find the library, we add the internal build
- # target to the project to allow user to manually trigger for any build type they need
- # in case only a specific build type is actually available (eg Release found, Debug Required)
- # This is mainly targeted for windows who required different runtime libs for different
- # types, and they arent compatible
- if(_multiconfig_generator)
+ endif()
+
+ # Add internal build target when a Multi Config Generator is used
+ # We cant add a dependency based off a generator expression for targeted build types,
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/19467
+ # therefore if the find heuristics only find the library, we add the internal build
+ # target to the project to allow user to manually trigger for any build type they need
+ # in case only a specific build type is actually available (eg Release found, Debug Required)
+ # This is mainly targeted for windows who required different runtime libs for different
+ # types, and they arent compatible
+ if(_multiconfig_generator)
+ if(NOT TARGET taglib)
buildTagLib()
endif()
+ add_dependencies(build_internal_depends taglib)
endif()
+
set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP TagLib::TagLib)
else()
if(TagLib_FIND_REQUIRED)