@@ -43,10 +43,14 @@ jobs:
43
43
run : |
44
44
rm -rf build install
45
45
cmake -B build/shared -S hidapisrc -DCMAKE_INSTALL_PREFIX=install/shared -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
46
+ cmake -B build/static -S hidapisrc -DCMAKE_INSTALL_PREFIX=install/static -DBUILD_SHARED_LIBS=FALSE -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
46
47
cmake -B build/framework -S hidapisrc -DCMAKE_INSTALL_PREFIX=install/framework -DCMAKE_FRAMEWORK=ON -DHIDAPI_BUILD_HIDTEST=ON "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
47
48
- name : Build CMake Shared
48
49
working-directory : build/shared
49
50
run : make install
51
+ - name : Build CMake Static
52
+ working-directory : build/static
53
+ run : make install
50
54
- name : Build CMake Framework
51
55
working-directory : build/framework
52
56
run : make install
@@ -56,10 +60,34 @@ jobs:
56
60
files : " install/shared/lib/libhidapi.dylib, \
57
61
install/shared/include/hidapi/hidapi.h, \
58
62
install/shared/include/hidapi/hidapi_darwin.h, \
63
+ install/static/lib/libhidapi.a, \
64
+ install/static/include/hidapi/hidapi.h, \
65
+ install/static/include/hidapi/hidapi_darwin.h, \
59
66
install/framework/lib/hidapi.framework/hidapi, \
60
67
install/framework/lib/hidapi.framework/Headers/hidapi.h, \
61
68
install/framework/lib/hidapi.framework/Headers/hidapi_darwin.h"
62
69
allow_failure : true
70
+ - name : Check CMake Export Package Shared
71
+ run : |
72
+ cmake \
73
+ -B build/shared_test \
74
+ -S hidapisrc/hidtest \
75
+ -Dhidapi_ROOT=install/shared \
76
+ -DCMAKE_INSTALL_PREFIX=install/shared_test \
77
+ "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
78
+ cd build/shared_test
79
+ make install
80
+ - name : Check CMake Export Package Static
81
+ run : |
82
+ cmake \
83
+ -B build/static_test \
84
+ -S hidapisrc/hidtest \
85
+ -Dhidapi_ROOT=install/static \
86
+ -DCMAKE_INSTALL_PREFIX=install/static_test \
87
+ "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
88
+ cd build/static_test
89
+ make install
90
+
63
91
- name : Check Meson build
64
92
run : |
65
93
meson setup build_meson hidapisrc
@@ -102,6 +130,27 @@ jobs:
102
130
install/static/include/hidapi/hidapi.h, \
103
131
install/static/include/hidapi/hidapi_libusb.h"
104
132
allow_failure : true
133
+ - name : Check CMake Export Package Shared
134
+ run : |
135
+ cmake \
136
+ -B build/shared_test \
137
+ -S hidapisrc/hidtest \
138
+ -Dhidapi_ROOT=install/shared \
139
+ -DCMAKE_INSTALL_PREFIX=install/shared_test \
140
+ "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
141
+ cd build/shared_test
142
+ make install
143
+ - name : Check CMake Export Package Static
144
+ run : |
145
+ cmake \
146
+ -B build/static_test \
147
+ -S hidapisrc/hidtest \
148
+ -Dhidapi_ROOT=install/static \
149
+ -DCMAKE_INSTALL_PREFIX=install/static_test \
150
+ "-DCMAKE_C_FLAGS=${NIX_COMPILE_FLAGS}"
151
+ cd build/static_test
152
+ make install
153
+
105
154
- name : Check Meson build
106
155
run : |
107
156
meson setup build_meson hidapisrc
@@ -136,6 +185,17 @@ jobs:
136
185
install/msvc/include/hidapi/hidapi.h, \
137
186
install/msvc/include/hidapi/hidapi_winapi.h"
138
187
allow_failure : true
188
+ - name : Check CMake Export Package
189
+ shell : cmd
190
+ run : |
191
+ cmake ^
192
+ -B build\msvc_test ^
193
+ -S hidapisrc\hidtest ^
194
+ -Dhidapi_ROOT=install\msvc ^
195
+ -DCMAKE_INSTALL_PREFIX=install\msvc_test ^
196
+ "-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%"
197
+ cd build\msvc_test
198
+ cmake --build . --target install
139
199
140
200
- name : Configure CMake NMake
141
201
shell : cmd
@@ -156,6 +216,19 @@ jobs:
156
216
install/nmake/include/hidapi/hidapi.h, \
157
217
install/nmake/include/hidapi/hidapi_winapi.h"
158
218
allow_failure : true
219
+ - name : Check CMake Export Package NMake
220
+ shell : cmd
221
+ run : |
222
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
223
+ cmake ^
224
+ -G"NMake Makefiles" ^
225
+ -B build\nmake_test ^
226
+ -S hidapisrc\hidtest ^
227
+ -Dhidapi_ROOT=install\nmake ^
228
+ -DCMAKE_INSTALL_PREFIX=install\nmake_test ^
229
+ "-DCMAKE_C_FLAGS=%MSVC_COMPILE_FLAGS%"
230
+ cd build\nmake_test
231
+ nmake install
159
232
160
233
- name : Configure CMake MinGW
161
234
shell : cmd
@@ -172,6 +245,18 @@ jobs:
172
245
install/mingw/include/hidapi/hidapi.h, \
173
246
install/mingw/include/hidapi/hidapi_winapi.h"
174
247
allow_failure : true
248
+ - name : Check CMake Export Package MinGW
249
+ shell : cmd
250
+ run : |
251
+ cmake ^
252
+ -G"MinGW Makefiles" ^
253
+ -B build\ming_test ^
254
+ -S hidapisrc\hidtest ^
255
+ -Dhidapi_ROOT=install\mingw ^
256
+ -DCMAKE_INSTALL_PREFIX=install\mingw_test ^
257
+ "-DCMAKE_C_FLAGS=%NIX_COMPILE_FLAGS%"
258
+ cd build\ming_test
259
+ cmake --build . --target install
175
260
176
261
- name : Check Meson build
177
262
shell : cmd
0 commit comments