Second attempt to fix build on Alpine Linux. issues 150, 319, 344.

This commit is contained in:
wb2osz 2023-09-25 03:17:15 +01:00
parent 3c73a6b2b2
commit ab834f338b
1 changed files with 16 additions and 3 deletions

View File

@ -32,9 +32,22 @@ if(LINUX)
)
endif()
# Add_library doesn't like to get an empty source file list.
# I tried several variations on this theme to test whether the list
# was not empty and was not successful in getting it to work
# on both Alpine and RPi.
#if("${misc_SOURCES}")
# This is less elegant and less maintainable but it works.
if ((NOT HAVE_STRLCPY) OR (NOT HAVE_STRLCAT))
add_library(misc STATIC
${misc_SOURCES}
)
else()
set(MISC_LIBRARIES "" CACHE INTERNAL "")
endif()
elseif(WIN32 OR CYGWIN) # windows