From 877d1c7707ac11df9d32b821e3c6dfd66e561e09 Mon Sep 17 00:00:00 2001 From: wb2osz Date: Sat, 23 Sep 2023 02:48:28 +0100 Subject: [PATCH] Fix build on Alpine Linux. issues 150, 319, 344. --- external/misc/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/external/misc/CMakeLists.txt b/external/misc/CMakeLists.txt index 16125d0..4dd4ec4 100644 --- a/external/misc/CMakeLists.txt +++ b/external/misc/CMakeLists.txt @@ -32,9 +32,15 @@ if(LINUX) ) endif() - add_library(misc STATIC - ${misc_SOURCES} - ) + # add_library doesn't like to get an empty source file list. + + if($misc_SOURCES) + add_library(misc STATIC + ${misc_SOURCES} + ) + else() + set(MISC_LIBRARIES "" CACHE INTERNAL "") + endif() elseif(WIN32 OR CYGWIN) # windows