File tree Expand file tree Collapse file tree 6 files changed +13
-26
lines changed Expand file tree Collapse file tree 6 files changed +13
-26
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ if (CCACHE_FOUND)
66 set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
77endif (CCACHE_FOUND)
88
9-
109set (
1110 CMAKE_TOOLCHAIN_FILE
1211 "${CMAKE_SOURCE_DIR} /cmake/toolchain/cxx17.cmake"
@@ -119,13 +118,8 @@ include_directories(
119118 deps/libsecp256k1/include
120119)
121120
122- if (APPLE )
123- include_directories (/usr/local/include )
124- link_directories (/usr/local/lib)
125- endif ()
126-
127- add_subdirectory (core)
128121add_subdirectory (libs)
122+ add_subdirectory (core)
129123
130124
131125if (TESTING)
Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: Apache-2.0
44#
55
6- if (APPLE )
7- include_directories (/usr/local/include )
8- link_directories (/usr/local/lib)
9- endif ()
10-
116add_subdirectory (ledger)
127add_subdirectory (filecoin)
Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: Apache-2.0
44#
55
6+ find_library (HIDAPI_LIB
7+ NAMES hidapi hidapi-libusb)
8+
9+ find_path (HIDAPI_INCLUDE_DIR
10+ NAMES hidapi.h
11+ PATH_SUFFIXES
12+ hidapi)
13+
614add_library (ledger_device
715 apdu_wrapper.cpp
816 device_hid_info.cpp
@@ -12,14 +20,5 @@ add_library(ledger_device
1220 utils.cpp
1321 )
1422
15- if (APPLE )
16- target_link_libraries (ledger_device
17- hidapi
18- )
19- endif ()
20-
21- if (UNIX AND NOT APPLE )
22- target_link_libraries (ledger_device
23- hidapi-libusb
24- )
25- endif ()
23+ target_include_directories (ledger_device PRIVATE ${HIDAPI_INCLUDE_DIR} )
24+ target_link_libraries (ledger_device ${HIDAPI_LIB} )
Original file line number Diff line number Diff line change 55
66#pragma once
77
8- #include < hidapi/hidapi .h>
8+ #include < hidapi.h>
99#include < functional>
1010#include < memory>
1111#include < mutex>
Original file line number Diff line number Diff line change 55
66#include " cpp-ledger/ledger/device_hid_info.hpp"
77
8- #include < hidapi/hidapi .h>
8+ #include < hidapi.h>
99#include < iomanip>
1010#include < sstream>
1111#include " cpp-ledger/ledger/utils.hpp"
Original file line number Diff line number Diff line change @@ -9,6 +9,5 @@ addtest(cpp_ledger_test
99 ledger_filecoin_test.cpp
1010 )
1111target_link_libraries (cpp_ledger_test
12- ledger_device
1312 ledger_filecoin
1413 )
You can’t perform that action at this time.
0 commit comments