Commit 63124098 authored by Ronan's avatar Ronan

fix(crypto): do not build ecc.c without a crypto lib + do not export crypto.h if unusable

parent e6a630b6
......@@ -23,7 +23,6 @@
set(HEADER_FILES
charconv.h
compiler.h
crypto.h
defs.h
exception.hh
list.h
......@@ -35,6 +34,11 @@ set(HEADER_FILES
vconnect.h
vfs.h
)
if(MBEDTLS_FOUND OR POLARSSL_FOUND)
list(APPEND HEADER_FILES crypto.h)
endif()
if(ENABLE_TESTS_COMPONENT)
list(APPEND HEADER_FILES tester.h)
endif()
......
......@@ -23,18 +23,17 @@
set(BCTOOLBOX_C_SOURCE_FILES
containers/list.c
logging/logging.c
parser.c
utils/port.c
vfs.c
vconnect.c
parser.c
vfs.c
)
set(BCTOOLBOX_CXX_SOURCE_FILES
containers/map.cc
conversion/charconv_encoding.cc
crypto/ecc.cc
utils/regex.cc
utils/exception.cc
utils/regex.cc
)
if(ANDROID)
......@@ -50,6 +49,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()
if(MBEDTLS_FOUND OR POLARSSL_FOUND)
list(APPEND BCTOOLBOX_C_SOURCE_FILES crypto/crypto.c)
list(APPEND BCTOOLBOX_CXX_SOURCE_FILES crypto/ecc.cc)
endif()
if(MBEDTLS_FOUND)
list(APPEND BCTOOLBOX_C_SOURCE_FILES crypto/mbedtls.c)
......
......@@ -35,7 +35,7 @@ if(ENABLE_TESTS AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
parser.c
)
if(MBEDTLS_FOUND OR POLARSSL_FOUND)
list(APPEND TESTER_SOURCES crypto.c)
list(APPEND TESTER_SOURCES crypto.c)
endif()
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment