2025-11-07 19:55:39 -05:00
|
|
|
project(fields)
|
2021-11-09 01:48:16 -05:00
|
|
|
|
|
|
|
|
include(CompileWarnings)
|
|
|
|
|
include(GenResources)
|
|
|
|
|
|
2024-05-24 13:48:05 -04:00
|
|
|
generate_resources(
|
2026-04-17 22:36:38 -04:00
|
|
|
src/main/native/resources/org/wpilib/fields/*
|
2025-02-10 02:03:15 -05:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/generated/main/cpp
|
2024-05-24 13:48:05 -04:00
|
|
|
FIELDS
|
2025-11-07 20:00:37 -05:00
|
|
|
wpi::fields
|
2024-05-24 13:48:05 -04:00
|
|
|
field_images_resources_src
|
|
|
|
|
)
|
2021-11-09 01:48:16 -05:00
|
|
|
|
2025-11-07 19:55:39 -05:00
|
|
|
add_library(fields ${field_images_resources_src} src/main/native/cpp/fields.cpp)
|
|
|
|
|
set_target_properties(fields PROPERTIES DEBUG_POSTFIX "d")
|
2021-11-09 01:48:16 -05:00
|
|
|
|
2025-11-07 19:55:39 -05:00
|
|
|
set_property(TARGET fields PROPERTY FOLDER "libraries")
|
2026-04-26 00:15:39 -07:00
|
|
|
target_compile_features(fields PUBLIC cxx_std_23)
|
2023-11-30 19:52:21 -05:00
|
|
|
if(MSVC)
|
2025-11-07 19:55:39 -05:00
|
|
|
target_compile_options(fields PUBLIC /bigobj)
|
2021-11-09 01:48:16 -05:00
|
|
|
endif()
|
2025-11-07 19:55:39 -05:00
|
|
|
wpilib_target_warnings(fields)
|
2021-11-09 01:48:16 -05:00
|
|
|
|
2025-11-07 19:55:39 -05:00
|
|
|
install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/fields")
|
2023-11-30 19:52:21 -05:00
|
|
|
target_include_directories(
|
2025-11-07 19:55:39 -05:00
|
|
|
fields
|
2023-11-30 19:52:21 -05:00
|
|
|
PUBLIC
|
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/include>
|
2025-11-07 19:55:39 -05:00
|
|
|
$<INSTALL_INTERFACE:${include_dest}/fields>
|
2023-11-30 19:52:21 -05:00
|
|
|
)
|
2024-04-10 22:04:22 -07:00
|
|
|
|
2025-11-07 19:55:39 -05:00
|
|
|
install(TARGETS fields EXPORT fields)
|
|
|
|
|
export(TARGETS fields FILE fields.cmake NAMESPACE fields::)
|
2024-07-27 23:16:34 -04:00
|
|
|
|
2025-11-07 19:55:39 -05:00
|
|
|
configure_file(fields-config.cmake.in ${WPILIB_BINARY_DIR}/fields-config.cmake)
|
|
|
|
|
install(FILES ${WPILIB_BINARY_DIR}/fields-config.cmake DESTINATION share/fields)
|
|
|
|
|
install(EXPORT fields DESTINATION share/fields)
|