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)
6
6
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ccache )
7
7
endif (CCACHE_FOUND )
8
8
9
-
10
9
set (
11
10
CMAKE_TOOLCHAIN_FILE
12
11
"${CMAKE_SOURCE_DIR} /cmake/toolchain/cxx17.cmake"
@@ -119,13 +118,8 @@ include_directories(
119
118
deps/libsecp256k1/include
120
119
)
121
120
122
- if (APPLE )
123
- include_directories (/usr/local/include )
124
- link_directories (/usr/local/lib )
125
- endif ()
126
-
127
- add_subdirectory (core )
128
121
add_subdirectory (libs )
122
+ add_subdirectory (core )
129
123
130
124
131
125
if (TESTING )
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: Apache-2.0
4
4
#
5
5
6
- if (APPLE )
7
- include_directories (/usr/local/include )
8
- link_directories (/usr/local/lib )
9
- endif ()
10
-
11
6
add_subdirectory (ledger )
12
7
add_subdirectory (filecoin )
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: Apache-2.0
4
4
#
5
5
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
+
6
14
add_library (ledger_device
7
15
apdu_wrapper.cpp
8
16
device_hid_info.cpp
@@ -12,14 +20,5 @@ add_library(ledger_device
12
20
utils.cpp
13
21
)
14
22
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 5
5
6
6
#pragma once
7
7
8
- #include < hidapi/hidapi .h>
8
+ #include < hidapi.h>
9
9
#include < functional>
10
10
#include < memory>
11
11
#include < mutex>
Original file line number Diff line number Diff line change 5
5
6
6
#include " cpp-ledger/ledger/device_hid_info.hpp"
7
7
8
- #include < hidapi/hidapi .h>
8
+ #include < hidapi.h>
9
9
#include < iomanip>
10
10
#include < sstream>
11
11
#include " cpp-ledger/ledger/utils.hpp"
Original file line number Diff line number Diff line change @@ -9,6 +9,5 @@ addtest(cpp_ledger_test
9
9
ledger_filecoin_test.cpp
10
10
)
11
11
target_link_libraries (cpp_ledger_test
12
- ledger_device
13
12
ledger_filecoin
14
13
)
You can’t perform that action at this time.
0 commit comments