diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3db6e1adc..5db52a4e6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,7 +106,7 @@ jobs: brew install opencv fi - name: configure - run: mkdir build && cd build && cmake -DWITH_SIMULATION_MODULES=OFF ${{ matrix.flags }} .. + run: mkdir build && cd build && cmake -DWITH_GUI=OFF ${{ matrix.flags }} .. - name: build working-directory: build run: make -j3 @@ -130,7 +130,7 @@ jobs: uses: lukka/run-cmake@v3 with: buildDirectory: ${{ runner.workspace }}/build/ - cmakeAppendedArgs: -DWITH_JAVA=OFF -DWITH_SIMULATION_MODULES=OFF + cmakeAppendedArgs: -DWITH_JAVA=OFF -DWITH_GUI=OFF cmakeListsOrSettingsJson: CMakeListsTxtAdvanced useVcpkgToolchainFile: true - name: Run Tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 91b53839da..399421f7b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ option(WITH_JAVA "Include java and JNI in the build" ON) option(WITH_CSCORE "Build cscore (needs OpenCV)" ON) option(WITH_WPILIB "Build hal, wpilibc/j, wpimath, and myRobot (needs OpenCV)" ON) option(WITH_TESTS "Build unit tests (requires internet connection)" ON) +option(WITH_GUI "Build GUI items" ON) option(WITH_SIMULATION_MODULES "Build simulation modules" ON) # Options for external HAL. @@ -155,7 +156,7 @@ endif() add_subdirectory(wpiutil) add_subdirectory(ntcore) -if (WITH_SIMULATION_MODULES AND NOT WITH_EXTERNAL_HAL) +if (WITH_GUI) add_subdirectory(imgui) add_subdirectory(wpigui) endif() diff --git a/simulation/CMakeLists.txt b/simulation/CMakeLists.txt index cb2b01c8b9..912d7b0e49 100644 --- a/simulation/CMakeLists.txt +++ b/simulation/CMakeLists.txt @@ -1,4 +1,6 @@ -add_subdirectory(halsim_gui) +if (WITH_GUI) + add_subdirectory(halsim_gui) +endif() #add_subdirectory(gz_msgs) #add_subdirectory(frc_gazebo_plugins) #add_subdirectory(halsim_gazebo)