From ae64caf9b5946d365971c550875000342e763de6 Mon Sep 17 00:00:00 2001 From: Naji Mammeri Date: Sat, 12 Oct 2019 15:42:33 +0200 Subject: [PATCH] Fix building programs while BUILD_SHARED_LIBS=ON --- CMakeLists.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdf30bd8..0a28e5ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -407,6 +407,7 @@ if (BUILD_PROGRAMS) $<$>:programs/sndfile-play.c> $<$:programs/sndfile-play-beos.cpp> ) + target_link_libraries (sndfile-play PRIVATE $<$:m>) target_link_libraries (sndfile-play PRIVATE sndfile) if (WIN32) target_link_libraries(sndfile-play PRIVATE winmm) @@ -426,7 +427,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-convert PRIVATE sndfile) + target_link_libraries (sndfile-convert PRIVATE sndfile $<$:m>) # sndfile-cmp @@ -435,7 +436,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-cmp PRIVATE sndfile) + target_link_libraries (sndfile-cmp PRIVATE sndfile $<$:m>) # sndfile-metadata-set @@ -444,7 +445,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-metadata-set PRIVATE sndfile) + target_link_libraries (sndfile-metadata-set PRIVATE sndfile $<$:m>) # sndfile-metadata-get @@ -453,7 +454,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-metadata-get PRIVATE sndfile) + target_link_libraries (sndfile-metadata-get PRIVATE sndfile $<$:m>) # sndfile-interleave @@ -462,7 +463,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-interleave PRIVATE sndfile) + target_link_libraries (sndfile-interleave PRIVATE sndfile $<$:m>) # sndfile-deinterleave @@ -471,7 +472,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-deinterleave PRIVATE sndfile) + target_link_libraries (sndfile-deinterleave PRIVATE sndfile $<$:m>) # sndfile-concat @@ -480,7 +481,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-concat PRIVATE sndfile) + target_link_libraries (sndfile-concat PRIVATE sndfile $<$:m>) # sndfile-salvage @@ -489,7 +490,7 @@ if (BUILD_PROGRAMS) programs/common.c programs/common.h ) - target_link_libraries (sndfile-salvage PRIVATE sndfile) + target_link_libraries (sndfile-salvage PRIVATE sndfile $<$:m>) set (SNDFILE_PROGRAM_TARGETS sndfile-info