ref: 8baaf9f2f51dbfa3511358200286c52f14e00506
parent: 474da1839bd0978d9d138dd28bc354d5d420361a
author: Hendrik <git@h3ndrk.de>
date: Sun Jun 6 06:35:22 EDT 2021
Move opusfileConfig.cmake.in Signed-off-by: Ralph Giles <giles@thaumas.net> Signed-off-by: evpobr <evpobr@gmail.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,7 +283,7 @@
)
include(CMakePackageConfigHelpers)
configure_package_config_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/opusfileConfig.cmake.in"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/opusfileConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/opusfileConfig.cmake"
INSTALL_DESTINATION
"${CMAKE_INSTALL_LIBDIR}/cmake/opusfile"
--- /dev/null
+++ b/cmake/opusfileConfig.cmake.in
@@ -1,0 +1,47 @@
+@PACKAGE_INIT@
+
+# Ported from CMakeFindDependencyMacro.cmake (finding configs and using pkgconfig as fallback)
+set(cmake_quiet_arg)
+if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
+ set(cmake_quiet_arg QUIET)
+endif()
+set(cmake_required_arg)
+if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
+ set(cmake_required_arg REQUIRED)
+endif()
+
+find_package(Ogg CONFIG ${cmake_quiet_arg})
+if(NOT TARGET Ogg::ogg)
+ find_package(PkgConfig REQUIRED ${cmake_quiet_arg})
+ pkg_check_modules(Ogg ${cmake_required_arg} ${cmake_quiet_arg} IMPORTED_TARGET ogg)
+ set_target_properties(PkgConfig::Ogg PROPERTIES IMPORTED_GLOBAL TRUE)
+ add_library(Ogg::ogg ALIAS PkgConfig::Ogg)
+endif()
+
+if (NOT TARGET Ogg::ogg)
+ set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency Ogg could not be found.")
+ set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
+ return()
+endif()
+
+find_package(Opus CONFIG ${cmake_quiet_arg})
+if(NOT TARGET Opus::opus)
+ find_package(PkgConfig REQUIRED ${cmake_quiet_arg})
+ pkg_check_modules(Opus ${cmake_required_arg} ${cmake_quiet_arg} IMPORTED_TARGET opus)
+ set_target_properties(PkgConfig::Opus PROPERTIES IMPORTED_GLOBAL TRUE)
+ add_library(Opus::opus ALIAS PkgConfig::Opus)
+endif()
+
+if (NOT TARGET Opus::opus)
+ set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency Opus could not be found.")
+ set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
+ return()
+endif()
+
+set(cmake_fd_required_arg)
+set(cmake_fd_quiet_arg)
+
+# Including targets of opusfile
+include("${CMAKE_CURRENT_LIST_DIR}/opusfileTargets.cmake")
+
+check_required_components(opusfile)
--- a/opusfileConfig.cmake.in
+++ /dev/null
@@ -1,47 +1,0 @@
-@PACKAGE_INIT@
-
-# Ported from CMakeFindDependencyMacro.cmake (finding configs and using pkgconfig as fallback)
-set(cmake_quiet_arg)
-if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- set(cmake_quiet_arg QUIET)
-endif()
-set(cmake_required_arg)
-if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
- set(cmake_required_arg REQUIRED)
-endif()
-
-find_package(Ogg CONFIG ${cmake_quiet_arg})
-if(NOT TARGET Ogg::ogg)
- find_package(PkgConfig REQUIRED ${cmake_quiet_arg})
- pkg_check_modules(Ogg ${cmake_required_arg} ${cmake_quiet_arg} IMPORTED_TARGET ogg)
- set_target_properties(PkgConfig::Ogg PROPERTIES IMPORTED_GLOBAL TRUE)
- add_library(Ogg::ogg ALIAS PkgConfig::Ogg)
-endif()
-
-if (NOT TARGET Ogg::ogg)
- set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency Ogg could not be found.")
- set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
- return()
-endif()
-
-find_package(Opus CONFIG ${cmake_quiet_arg})
-if(NOT TARGET Opus::opus)
- find_package(PkgConfig REQUIRED ${cmake_quiet_arg})
- pkg_check_modules(Opus ${cmake_required_arg} ${cmake_quiet_arg} IMPORTED_TARGET opus)
- set_target_properties(PkgConfig::Opus PROPERTIES IMPORTED_GLOBAL TRUE)
- add_library(Opus::opus ALIAS PkgConfig::Opus)
-endif()
-
-if (NOT TARGET Opus::opus)
- set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency Opus could not be found.")
- set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
- return()
-endif()
-
-set(cmake_fd_required_arg)
-set(cmake_fd_quiet_arg)
-
-# Including targets of opusfile
-include("${CMAKE_CURRENT_LIST_DIR}/opusfileTargets.cmake")
-
-check_required_components(opusfile)