forked from Cybersecurity-LINKS/wam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (25 loc) · 938 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
project(WAM VERSION 1.0)
link_directories( "${CMAKE_INSTALL_PREFIX}/lib"
"${CMAKE_INSTALL_PREFIX}/iota.c/src/client"
"${CMAKE_INSTALL_PREFIX}/iota.c/src/core"
"${CMAKE_INSTALL_PREFIX}/iota.c/src/crypto" )
add_library(WAM "WAM.c")
if(RISCV)
message(STATUS "Compiling for riscv64")
include(macros.cmake)
# include($ENV{KEYSTONE_SDK_DIR}/cmake/macros.cmake)
set(BITS 64)
use_riscv_toolchain(${BITS})
endif()
add_subdirectory("${CMAKE_SOURCE_DIR}/iota.c")
target_include_directories( WAM PUBLIC
"${CMAKE_INSTALL_PREFIX}/include"
"${CMAKE_INSTALL_PREFIX}/include/cjson"
"${CMAKE_SOURCE_DIR}/iota.c/src"
"${CMAKE_SOURCE_DIR}" )
target_link_libraries(WAM iota_client)
add_dependencies(WAM iota_client)
set( APP_EXE ExampleWAM )
add_executable( ${APP_EXE} "example.c" )
target_link_libraries( ${APP_EXE} WAM )