119 lines
3.3 KiB
CMake
119 lines
3.3 KiB
CMake
set(LIBSSH_SRC libssh/src)
|
|
set(LIBSSH_INCLUDE libssh/include)
|
|
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRC}/agent.c
|
|
${LIBSSH_SRC}/auth.c
|
|
${LIBSSH_SRC}/base64.c
|
|
${LIBSSH_SRC}/bignum.c
|
|
${LIBSSH_SRC}/buffer.c
|
|
${LIBSSH_SRC}/callbacks.c
|
|
${LIBSSH_SRC}/channels.c
|
|
${LIBSSH_SRC}/client.c
|
|
${LIBSSH_SRC}/config.c
|
|
${LIBSSH_SRC}/connect.c
|
|
${LIBSSH_SRC}/connector.c
|
|
${LIBSSH_SRC}/crypto_common.c
|
|
${LIBSSH_SRC}/curve25519.c
|
|
${LIBSSH_SRC}/dh.c
|
|
${LIBSSH_SRC}/ecdh.c
|
|
${LIBSSH_SRC}/error.c
|
|
${LIBSSH_SRC}/getpass.c
|
|
${LIBSSH_SRC}/gzip.c
|
|
${LIBSSH_SRC}/init.c
|
|
${LIBSSH_SRC}/kdf.c
|
|
${LIBSSH_SRC}/kex.c
|
|
${LIBSSH_SRC}/known_hosts.c
|
|
${LIBSSH_SRC}/knownhosts.c
|
|
${LIBSSH_SRC}/legacy.c
|
|
${LIBSSH_SRC}/log.c
|
|
${LIBSSH_SRC}/match.c
|
|
${LIBSSH_SRC}/messages.c
|
|
${LIBSSH_SRC}/misc.c
|
|
${LIBSSH_SRC}/options.c
|
|
${LIBSSH_SRC}/packet.c
|
|
${LIBSSH_SRC}/packet_cb.c
|
|
${LIBSSH_SRC}/packet_crypt.c
|
|
${LIBSSH_SRC}/pcap.c
|
|
${LIBSSH_SRC}/pki.c
|
|
${LIBSSH_SRC}/pki_container_openssh.c
|
|
${LIBSSH_SRC}/poll.c
|
|
${LIBSSH_SRC}/session.c
|
|
${LIBSSH_SRC}/scp.c
|
|
${LIBSSH_SRC}/socket.c
|
|
${LIBSSH_SRC}/string.c
|
|
${LIBSSH_SRC}/threads.c
|
|
${LIBSSH_SRC}/wrapper.c
|
|
${LIBSSH_SRC}/external/bcrypt_pbkdf.c
|
|
${LIBSSH_SRC}/external/blowfish.c
|
|
${LIBSSH_SRC}/config_parser.c
|
|
${LIBSSH_SRC}/token.c
|
|
${LIBSSH_SRC}/pki_ed25519_common.c
|
|
)
|
|
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRCS}
|
|
${LIBSSH_SRC}/threads/noop.c
|
|
)
|
|
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRCS}
|
|
${LIBSSH_SRC}/threads/mbedtls.c
|
|
${LIBSSH_SRC}/libmbedcrypto.c
|
|
${LIBSSH_SRC}/mbedcrypto_missing.c
|
|
${LIBSSH_SRC}/pki_mbedcrypto.c
|
|
${LIBSSH_SRC}/ecdh_mbedcrypto.c
|
|
${LIBSSH_SRC}/getrandom_mbedcrypto.c
|
|
${LIBSSH_SRC}/md_mbedcrypto.c
|
|
${LIBSSH_SRC}/dh_key.c
|
|
${LIBSSH_SRC}/pki_ed25519.c
|
|
${LIBSSH_SRC}/external/ed25519.c
|
|
${LIBSSH_SRC}/external/curve25519_ref.c
|
|
${LIBSSH_SRC}/external/fe25519.c
|
|
${LIBSSH_SRC}/external/ge25519.c
|
|
${LIBSSH_SRC}/external/sc25519.c
|
|
)
|
|
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRCS}
|
|
${LIBSSH_SRC}/external/chacha.c
|
|
${LIBSSH_SRC}/external/poly1305.c
|
|
${LIBSSH_SRC}/chachapoly.c
|
|
)
|
|
|
|
if (CONFIG_LIBSSH_SFTP)
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRCS}
|
|
${LIBSSH_SRC}/sftp.c
|
|
${LIBSSH_SRC}/sftp_common.c
|
|
${LIBSSH_SRC}/sftp_aio.c
|
|
)
|
|
|
|
if (CONFIG_LIBSSH_SERVER)
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRCS}
|
|
${LIBSSH_SRC}/sftpserver.c
|
|
)
|
|
endif (CONFIG_LIBSSH_SERVER)
|
|
endif (CONFIG_LIBSSH_SFTP)
|
|
|
|
if (CONFIG_LIBSSH_SERVER)
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRCS}
|
|
${LIBSSH_SRC}/server.c
|
|
${LIBSSH_SRC}/bind.c
|
|
${LIBSSH_SRC}/bind_config.c
|
|
)
|
|
endif (CONFIG_LIBSSH_SERVER)
|
|
|
|
set(LIBSSH_SRCS
|
|
${LIBSSH_SRCS}
|
|
${LIBSSH_SRC}/dh-gex.c
|
|
)
|
|
|
|
idf_component_register(SRCS "${LIBSSH_SRCS}"
|
|
INCLUDE_DIRS compat "${LIBSSH_INCLUDE}"
|
|
REQUIRES lwip mbedtls)
|
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE
|
|
-Wno-error=format; -Wno-error=char-subscripts -Wno-error=int-conversion) |