-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
35 lines (30 loc) · 1.17 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
#set(BUILD_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/install CACHE STRING "install destination for 3rd party libs and plugins")
set(BUILD_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/install CACHE STRING "")
set(WALLET_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE STRING "")
# P3 is required
find_package( PythonInterp 3 REQUIRED )
if ((${CMAKE_BUILD_TYPE} MATCHES "Debug"))
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
endif()
include(cmake/solc.cmake)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/install/lib/)
if(BUILD_XCOMPILE)
project(NONE)
include_directories(helpers/zephyr)
include(cmake/zephyr.cmake)
add_subdirectory(zephyr-wallet)
else()
cmake_minimum_required(VERSION 3.0.0)
project("wallet-x86")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -pedantic -Wall -Wextra")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 -pedantic -Wall -Wextra")
message(STATUS "x86 build!")
# enable testing for x86 builds
enable_testing()
add_subdirectory(examples/tests)
include_directories( ${CMAKE_SOURCE_DIR}/helpers )
endif()
include(cmake/trezor-crypto.cmake)
include(cmake/nanopb.cmake)
include(cmake/wallet.cmake)