From dae91683bcb616446175a67d79f2e0775b12b580 Mon Sep 17 00:00:00 2001 From: Be Date: Mon, 16 Aug 2021 11:23:01 -0500 Subject: [PATCH] CMake fixes for SoundTouchDLL --- CMakeLists.txt | 4 +++- SoundTouchConfig.cmake.in | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bddfd9..8c8ecc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,11 +26,13 @@ target_include_directories(SoundTouch PUBLIC option(SOUNDTOUCH_DLL "Build SoundTouchDLL C wrapper library" OFF) if(SOUNDTOUCH_DLL) - add_library(SoundTouchDLL + add_library(SoundTouchDLL SHARED source/SoundTouchDLL/SoundTouchDLL.cpp source/SoundTouchDLL/SoundTouchDLL.rc ) + target_include_directories(SoundTouchDLL PUBLIC $) install(FILES source/SoundTouchDLL/SoundTouchDLL.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/soundtouch") + install(TARGETS SoundTouchDLL EXPORT SoundTouchTargets) endif() if(WIN32 AND BUILD_SHARED_LIBS) diff --git a/SoundTouchConfig.cmake.in b/SoundTouchConfig.cmake.in index 3e1e494..0709ab8 100644 --- a/SoundTouchConfig.cmake.in +++ b/SoundTouchConfig.cmake.in @@ -6,3 +6,9 @@ check_required_components(SoundTouch) get_target_property(SoundTouch_LOCATION SoundTouch::SoundTouch LOCATION) message(STATUS "Found SoundTouch: ${SoundTouch_LOCATION}") + +if(@SOUNDTOUCH_DLL@) + check_require_components(SoundTouchDLL) + get_target_property(SoundTouchDLL_LOCATION SoundTouch::SoundTouchDLL LOCATION) + message(STATUS "Found SoundTouchDLL: ${SoundTouchDLL_LOCATION}") +endif()