-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
36 lines (26 loc) · 1.16 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.5.1)
project(cychain-poc)
# Include the BICYCL library
add_subdirectory("include/bicycl" EXCLUDE_FROM_ALL)
# Add custom target for poc
add_custom_target(poc COMMAND ${CMAKE_COMMAND} -E sleep 0)
# Add the executable for cychain_sig_gen
add_executable(cychain_sig_gen src/ThreadPool.cpp src/CryptoUtils.cpp src/cychain_sig_gen.cpp)
# Include directories
include_directories(include/trezor-firmware/crypto)
# Ensure BICYCL is linked
target_link_libraries(cychain_sig_gen PUBLIC bicycl)
# Set the directory for trezor-firmware
set(TREZOR_FIRMWARE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/trezor-firmware")
# Add custom target to build the trezor-crypto library
add_custom_target(
trezor_crypto_build
COMMAND make -C ${TREZOR_FIRMWARE_DIR}/crypto all
COMMENT "Building trezor-firmware/crypto library"
)
# Add dependency to ensure trezor_crypto_build is built first
add_dependencies(cychain_sig_gen trezor_crypto_build)
# Link the trezor-crypto library
target_link_libraries(cychain_sig_gen PRIVATE "${TREZOR_FIRMWARE_DIR}/crypto/tests/libtrezor-crypto.so")
# Add dependencies for the poc target
add_dependencies(poc cychain_sig_gen)