From b0f1ae7ea35268462533849883fb5507b01f5a07 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sat, 19 Jun 2021 09:30:49 -0700 Subject: [PATCH] [build] CMake: Build the HAL even if WITH_CSCORE=OFF (#3449) Also handle the case of WITH_WPILIB=OFF WITH_SIMULATION_MODULES=ON. --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13e2338b55..21f6cc9d28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,15 +191,18 @@ if (WITH_GUI) add_subdirectory(outlineviewer) endif() +if (WITH_WPILIB OR WITH_SIMULATION_MODULES) + set(HAL_DEP_REPLACE ${HAL_DEP_REPLACE_IMPL}) + add_subdirectory(hal) +endif() + if (WITH_CSCORE) set(CSCORE_DEP_REPLACE ${CSCORE_DEP_REPLACE_IMPL}) set(CAMERASERVER_DEP_REPLACE ${CAMERASERVER_DEP_REPLACE_IMPL}) add_subdirectory(cscore) add_subdirectory(cameraserver) if (WITH_WPILIB) - set(HAL_DEP_REPLACE ${HAL_DEP_REPLACE_IMPL}) set(WPILIBC_DEP_REPLACE ${WPILIBC_DEP_REPLACE_IMPL}) - add_subdirectory(hal) add_subdirectory(wpilibj) add_subdirectory(wpilibc) add_subdirectory(wpilibNewCommands)