@@ -202,41 +202,13 @@ if(WITH_JAVA)
202
202
set (CMAKE_JAVA_COMPILE_FLAGS "-encoding" "UTF8" "-Xlint:unchecked" )
203
203
endif ()
204
204
205
- if (USE_SYSTEM_LIBUV )
206
- set (LIBUV_SYSTEM_REPLACE
207
- "
208
- find_dependency(libuv CONFIG)
209
- "
210
- )
211
- endif ()
212
-
213
- if (USE_SYSTEM_EIGEN )
214
- set (EIGEN_SYSTEM_REPLACE "find_package(Eigen3 CONFIG)" )
215
- endif ()
216
-
217
205
find_package (LIBSSH 0.7.1 )
218
206
219
207
set (CMAKE_FIND_PACKAGE_PREFER_CONFIG ON )
220
208
set (protobuf_MODULE_COMPATIBLE ON CACHE BOOL "" FORCE )
221
209
find_package (Protobuf REQUIRED )
222
210
set (CMAKE_FIND_PACKAGE_PREFER_CONFIG OFF )
223
211
224
- set (APRILTAG_DEP_REPLACE "find_dependency(apriltag)" )
225
- set (CAMERASERVER_DEP_REPLACE_IMPL "find_dependency(cameraserver)" )
226
- set (CSCORE_DEP_REPLACE_IMPL "find_dependency(cscore)" )
227
- set (HAL_DEP_REPLACE_IMPL "find_dependency(hal)" )
228
- set (NTCORE_DEP_REPLACE "find_dependency(ntcore)" )
229
- set (WPILIBC_DEP_REPLACE_IMPL "find_dependency(wpilibc)" )
230
- set (WPILIBJ_DEP_REPLACE "find_dependency(wpilibj)" )
231
- set (WPILIBNEWCOMMANDS_DEP_REPLACE "find_dependency(wpilibNewCommands)" )
232
- set (WPIMATH_DEP_REPLACE "find_dependency(wpimath)" )
233
- set (WPINET_DEP_REPLACE "find_dependency(wpinet)" )
234
- set (WPIUNITS_DEP_REPLACE "find_dependency(wpiunits)" )
235
- set (WPIUTIL_DEP_REPLACE "find_dependency(wpiutil)" )
236
-
237
- set (FILENAME_DEP_REPLACE "get_filename_component(SELF_DIR \" $\{ CMAKE_CURRENT_LIST_FILE\}\" PATH)" )
238
- set (SELF_DIR "$\{ SELF_DIR\} " )
239
-
240
212
get_property (isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
241
213
242
214
if (isMultiConfig )
@@ -356,22 +328,39 @@ if(WITH_TESTS)
356
328
include (GoogleTest )
357
329
endif ()
358
330
331
+ if (USE_SYSTEM_LIBUV )
332
+ set (LIBUV_SYSTEM_REPLACE "find_dependency(libuv CONFIG)" )
333
+ endif ()
334
+
335
+ if (USE_SYSTEM_EIGEN )
336
+ set (EIGEN_SYSTEM_REPLACE "find_package(Eigen3 CONFIG)" )
337
+ endif ()
338
+
339
+ set (FILENAME_DEP_REPLACE "get_filename_component(SELF_DIR \" $\{ CMAKE_CURRENT_LIST_FILE\}\" PATH)" )
340
+ set (SELF_DIR "$\{ SELF_DIR\} " )
341
+ set (WPIUNITS_DEP_REPLACE_IMPL "find_dependency(wpiunits)" )
342
+ set (WPIUTIL_DEP_REPLACE "find_dependency(wpiutil)" )
359
343
add_subdirectory (wpiutil )
360
344
361
345
if (WITH_NTCORE )
346
+ set (NTCORE_DEP_REPLACE "find_dependency(ntcore)" )
347
+ set (WPINET_DEP_REPLACE "find_dependency(wpinet)" )
362
348
add_subdirectory (wpinet )
363
349
add_subdirectory (ntcore )
364
350
endif ()
365
351
366
352
if (WITH_WPIMATH )
367
353
if (WITH_JAVA )
354
+ set (WPIUNITS_DEP_REPLACE ${WPIUNITS_DEP_REPLACE_IMPL} )
368
355
add_subdirectory (wpiunits )
369
356
endif ()
357
+ set (WPIMATH_DEP_REPLACE "find_dependency(wpimath)" )
370
358
add_subdirectory (wpimath )
371
359
endif ()
372
360
373
361
if (WITH_WPIUNITS AND NOT WITH_WPIMATH )
374
362
# In case of building wpiunits standalone
363
+ set (WPIUNITS_DEP_REPLACE ${WPIUNITS_DEP_REPLACE_IMPL} )
375
364
add_subdirectory (wpiunits )
376
365
endif ()
377
366
@@ -389,19 +378,22 @@ if(WITH_GUI)
389
378
endif ()
390
379
391
380
if (WITH_WPILIB OR WITH_SIMULATION_MODULES )
392
- set (HAL_DEP_REPLACE ${HAL_DEP_REPLACE_IMPL} )
381
+ set (HAL_DEP_REPLACE "find_dependency(hal)" )
393
382
add_subdirectory (hal )
394
383
endif ()
395
384
396
385
if (WITH_CSCORE )
397
- set (CSCORE_DEP_REPLACE ${CSCORE_DEP_REPLACE_IMPL} )
398
- set (CAMERASERVER_DEP_REPLACE ${CAMERASERVER_DEP_REPLACE_IMPL} )
386
+ set (CAMERASERVER_DEP_REPLACE "find_dependency(cameraserver)" )
387
+ set (CSCORE_DEP_REPLACE "find_dependency(cscore)" )
399
388
add_subdirectory (cscore )
400
389
add_subdirectory (cameraserver )
401
390
endif ()
402
391
403
392
if (WITH_WPILIB )
404
- set (WPILIBC_DEP_REPLACE ${WPILIBC_DEP_REPLACE_IMPL} )
393
+ set (APRILTAG_DEP_REPLACE "find_dependency(apriltag)" )
394
+ set (WPILIBC_DEP_REPLACE "find_dependency(wpilibc)" )
395
+ set (WPILIBJ_DEP_REPLACE "find_dependency(wpilibj)" )
396
+ set (WPILIBNEWCOMMANDS_DEP_REPLACE "find_dependency(wpilibNewCommands)" )
405
397
add_subdirectory (apriltag )
406
398
add_subdirectory (wpilibj )
407
399
add_subdirectory (wpilibc )
0 commit comments