darling-corecrypto/CMakeLists.txt

116 lines
2.1 KiB
CMake
Raw Permalink Normal View History

2020-01-14 20:06:37 +00:00
project(darling-corecrypto)
2020-01-14 20:06:37 +00:00
add_compile_options(
-Wno-return-type
)
2017-05-03 02:55:29 +00:00
add_definitions(
2019-12-22 23:02:31 +00:00
-DDEBUG
-D_FILE_OFFSET_BITS=64
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include
)
set(corecrypto_sources
src/cc.c
src/ccdigest.c
src/ccmd2.c
src/ccmd4.c
src/ccmd5.c
src/ccder.c
2017-05-03 02:55:29 +00:00
src/ccec.c
src/ccdh.c
src/ccdh_gp.c
src/ccaes.c
2017-08-08 14:45:08 +00:00
src/ccsha2xx.c
src/ccsha3xx.c
2017-05-03 02:55:29 +00:00
src/cczp.c
src/ccsha1.c
src/ccrsa.c
src/ccrng.c
2017-08-08 11:34:45 +00:00
src/ccrng_system.c
2017-05-03 02:55:29 +00:00
src/ccrc4.c
src/ccn.c
src/ccmode.c
src/ccdes.c
src/ccrsa_priv.c
src/cccast.c
src/ccrc2.c
src/ccblowfish.c
src/ccnistkdf.c
src/ccz.c
src/cccmac.c
src/ccripemd.c
src/cchkdf.c
src/cchmac.c
src/ccpad.c
src/ccpbkdf2.c
src/ccrc4.c
src/ccansikdf.c
src/ccecies.c
2017-08-08 15:01:58 +00:00
src/ccrng_pbkdf2.c
src/ccec_projective_point.c
src/ccec_points.c
src/ccn_extra.c
src/cczp_extra.c
2020-04-05 16:39:46 +00:00
src/ccgcm.c
2022-10-03 04:58:27 +00:00
src/cch2c.c
src/ccsrp.c
src/ccwrap_priv.c
src/cc_priv.c
src/ccec25519.c
src/cccbc.c
src/ccccm.c
src/cccfb.c
src/cccfb8.c
2022-10-03 04:58:27 +00:00
src/ccchacha20poly1305.c
src/ccctr.c
src/ccofb.c
src/ccxts.c
src/ccckg.c
)
if (DARLING)
add_compile_options(
-nostdinc
)
set(DYLIB_INSTALL_NAME "/usr/lib/system/libcorecrypto.dylib")
add_circular(corecrypto FAT
SOURCES
${corecrypto_sources}
SIBLINGS
system_dyld
compiler_rt
system_kernel
platform
system_malloc
system_c
system_blocks
system_pthread
macho
libdispatch_shared
)
target_link_options(corecrypto PRIVATE
-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/scripts/exported-symbols.exp
)
2020-01-14 20:06:37 +00:00
add_darling_static_library(corecrypto_static FAT SOURCES $<TARGET_OBJECTS:corecrypto_obj>)
2020-07-02 15:51:21 +00:00
install(TARGETS corecrypto DESTINATION libexec/darling/usr/lib/system)
else()
add_library(corecrypto SHARED ${corecrypto_sources})
# TODO: define list of exported symbols for non-Apple linkers
# maybe we should just define CC_EXPORT and sprinkle that throughout our codebase
#
# building for non-Apple platforms is only used for quick testing at the moment,
# so it doesn't matter that much if we have some unwanted exported symbols
endif()
2020-01-14 20:06:37 +00:00
if (ENABLE_TESTS)
add_subdirectory(tests)
2020-01-14 20:06:37 +00:00
endif (ENABLE_TESTS)