mirror of
https://github.com/upa/mscp.git
synced 2026-02-13 16:44:43 +08:00
do not build strlcat.c if HAVE_STRLCAT is true
This commit is contained in:
@@ -85,6 +85,9 @@ endif()
|
||||
|
||||
# Symbol check
|
||||
check_symbol_exists(strlcat string.h HAVE_STRLCAT)
|
||||
if (NOT HAVE_STRLCAT)
|
||||
list(APPEND OPENBSD_COMPAT_SRC src/openbsd-compat/strlcat.c)
|
||||
endif()
|
||||
|
||||
# generate config.h in build dir
|
||||
configure_file(
|
||||
@@ -96,7 +99,7 @@ list(APPEND MSCP_BUILD_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
# libmscp.a
|
||||
set(LIBMSCP_SRC
|
||||
src/mscp.c src/ssh.c src/fileops.c src/path.c src/platform.c src/message.c
|
||||
src/openbsd-compat/strlcat.c)
|
||||
${OPENBSD_COMPAT_SRC})
|
||||
add_library(mscp-static STATIC ${LIBMSCP_SRC})
|
||||
target_include_directories(mscp-static
|
||||
PRIVATE ${MSCP_BUILD_INCLUDE_DIRS} ${mscp_SOURCE_DIR}/include)
|
||||
|
||||
Reference in New Issue
Block a user