Skip to content

Commit

Permalink
[build] CMake: remove external HAL option
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 committed Jul 2, 2024
1 parent 1ccd8d1 commit cc9c5ff
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ 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.
option(WITH_EXTERNAL_HAL "Use a separately built HAL" OFF)
set(EXTERNAL_HAL_FILE "" CACHE FILEPATH "Location to look for an external HAL CMake File")

# Options for using a package manager (e.g., vcpkg) for certain dependencies.
option(USE_SYSTEM_FMTLIB "Use system fmtlib" OFF)
option(USE_SYSTEM_LIBUV "Use system libuv" OFF)
Expand Down
4 changes: 0 additions & 4 deletions README-CMAKE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ The following build options are available:
* This option will build the wpimath library. This option must be on to build wpilib.
* `WITH_WPIUNITS` (ON Default)
* This option will build the wpiunits library. This option must be on to build the Java wpimath library and requires `WITH_JAVA` to also be on.
* `WITH_EXTERNAL_HAL` (OFF Default)
* This option will build wpilib with an externally built HAL.
* `EXTERNAL_HAL_FILE`
* Set this option to the CMake File of the externally built HAL. NOTE: set it to the file itself, not the folder the file is located in!
* `OPENCV_JAVA_INSTALL_DIR`
* Set this option to the location of the archive of the OpenCV Java bindings (it should be called opencv-xxx.jar, with the x'es being version numbers). NOTE: set it to the LOCATION of the file, not the file itself!
* `NO_WERROR` (OFF Default)
Expand Down
14 changes: 1 addition & 13 deletions hal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,9 @@ file(
hal_sim_native_src
src/main/native/sim/mockdata/*.cpp
)
add_library(hal ${hal_shared_native_src})
add_library(hal ${hal_shared_native_src} ${hal_sim_native_src})
wpilib_target_warnings(hal)
set_target_properties(hal PROPERTIES DEBUG_POSTFIX "d")

if(USE_EXTERNAL_HAL)
include(${EXTERNAL_HAL_FILE})
else()
target_sources(hal PRIVATE ${hal_sim_native_src})
endif()

set_target_properties(hal PROPERTIES OUTPUT_NAME "wpiHal")

target_include_directories(
Expand Down Expand Up @@ -77,11 +70,6 @@ if(WITH_JAVA)
install_jar_exports(TARGETS hal_jar FILE hal_jar.cmake DESTINATION share/hal)

add_library(haljni ${hal_shared_jni_src})

if(USE_EXTERNAL_HAL)
include(${EXTERNAL_HAL_FILE})
endif()

set_target_properties(haljni PROPERTIES OUTPUT_NAME "wpiHaljni")

wpilib_target_warnings(haljni)
Expand Down

0 comments on commit cc9c5ff

Please sign in to comment.