summaryrefslogtreecommitdiff
path: root/flac-config.cmake.in
diff options
context:
space:
mode:
authormartinRenou <martin.renou@gmail.com>2022-05-30 20:22:45 +0200
committerGitHub <noreply@github.com>2022-05-30 20:22:45 +0200
commit39e6e570d8ee589f8f692f348644e47ccef400cf (patch)
tree9a6457e07a7ee52eec6dd240299e608b00848036 /flac-config.cmake.in
parent95064f9f083ac9520a17f2ba880e114643dcbeac (diff)
downloadflac-39e6e570d8ee589f8f692f348644e47ccef400cf.tar.gz
Export flac properly when use with add_subdirectory (#285)
This allows for flac to be used in a larger CMake project with add_subdirectory. It also allows for Ogg to be build elsewhere in the larger project.
Diffstat (limited to 'flac-config.cmake.in')
-rw-r--r--flac-config.cmake.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/flac-config.cmake.in b/flac-config.cmake.in
index f44133c5..bcafc4c8 100644
--- a/flac-config.cmake.in
+++ b/flac-config.cmake.in
@@ -1,7 +1,9 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
-find_dependency(Ogg)
+if(NOT TARGET Ogg::ogg)
+ find_dependency(Ogg)
+endif()
include("${CMAKE_CURRENT_LIST_DIR}/targets.cmake")