mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
* Use explicit this capture required by C++20 * Use C++20 span * Replace wpi::numbers with std::numbers * Fix C++20 clang-tidy warning false positive in fmt * Remove ciso646 include since C++20 removed that header * Fix global-buffer-overflow asan warnings in ntcore tests * Add DIOSetProxy constructor to HAL * Upgrade MSVC compiler to 2022 * Bump native-utils to 2023.2.7 (changes to std=c++20) Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
41 lines
1.5 KiB
CMake
41 lines
1.5 KiB
CMake
project(fieldImages)
|
|
|
|
include(CompileWarnings)
|
|
include(GenResources)
|
|
|
|
if (WITH_JAVA)
|
|
find_package(Java REQUIRED)
|
|
include(UseJava)
|
|
|
|
file(GLOB JACKSON_JARS "${WPILIB_BINARY_DIR}/wpiutil/thirdparty/jackson/*.jar")
|
|
set(CMAKE_JAVA_INCLUDE_PATH fieldImages.jar ${JACKSON_JARS})
|
|
|
|
file(GLOB_RECURSE JAVA_SOURCES src/main/java/*.java)
|
|
file(GLOB_RECURSE JAVA_RESOURCES src/main/native/resources/*.json src/main/native/resources/*.png src/main/native/resources/*.jpg)
|
|
add_jar(field_images_jar SOURCES ${JAVA_SOURCES} RESOURCES NAMESPACE "edu/wpi/first/fields" ${JAVA_RESOURCES} OUTPUT_NAME fieldImages)
|
|
|
|
get_property(FIELD_IMAGES_JAR_FILE TARGET field_images_jar PROPERTY JAR_FILE)
|
|
install(FILES ${FIELD_IMAGES_JAR_FILE} DESTINATION "${java_lib_dest}")
|
|
|
|
set_property(TARGET field_images_jar PROPERTY FOLDER "java")
|
|
|
|
endif()
|
|
|
|
|
|
GENERATE_RESOURCES(src/main/native/resources/edu/wpi/first/fields generated/main/cpp FIELDS fields field_images_resources_src)
|
|
|
|
|
|
add_library(fieldImages ${field_images_resources_src})
|
|
set_target_properties(fieldImages PROPERTIES DEBUG_POSTFIX "d")
|
|
|
|
set_property(TARGET fieldImages PROPERTY FOLDER "libraries")
|
|
target_compile_features(fieldImages PUBLIC cxx_std_20)
|
|
if (MSVC)
|
|
target_compile_options(fieldImages PUBLIC /bigobj)
|
|
endif()
|
|
wpilib_target_warnings(fieldImages)
|
|
|
|
target_include_directories(fieldImages PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/include>
|
|
$<INSTALL_INTERFACE:${include_dest}/fields>)
|