2025-11-07 19:55:39 -05:00
|
|
|
project(commandsv2)
|
2020-11-26 14:47:35 -05:00
|
|
|
|
|
|
|
|
include(SubDirList)
|
|
|
|
|
include(CompileWarnings)
|
|
|
|
|
include(AddTest)
|
|
|
|
|
|
2024-06-08 12:59:07 -04:00
|
|
|
file(
|
2025-11-07 19:55:39 -05:00
|
|
|
GLOB_RECURSE commandsv2_native_src
|
2024-06-08 12:59:07 -04:00
|
|
|
src/main/native/cpp/*.cpp
|
|
|
|
|
src/generated/main/native/cpp/*.cpp
|
|
|
|
|
)
|
2025-11-07 19:55:39 -05:00
|
|
|
add_library(commandsv2 ${commandsv2_native_src})
|
|
|
|
|
set_target_properties(commandsv2 PROPERTIES DEBUG_POSTFIX "d")
|
|
|
|
|
set_property(TARGET commandsv2 PROPERTY FOLDER "libraries")
|
2020-11-26 14:47:35 -05:00
|
|
|
|
2026-04-26 00:15:39 -07:00
|
|
|
target_compile_features(commandsv2 PUBLIC cxx_std_23)
|
2025-11-07 19:55:39 -05:00
|
|
|
wpilib_target_warnings(commandsv2)
|
|
|
|
|
target_link_libraries(commandsv2 wpilibc)
|
2020-11-26 14:47:35 -05:00
|
|
|
|
2023-11-30 19:52:21 -05:00
|
|
|
target_include_directories(
|
2025-11-07 19:55:39 -05:00
|
|
|
commandsv2
|
2023-11-30 19:52:21 -05:00
|
|
|
PUBLIC
|
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/include>
|
2024-06-08 12:59:07 -04:00
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/generated/main/native/include>
|
2025-11-07 19:55:39 -05:00
|
|
|
$<INSTALL_INTERFACE:${include_dest}/commandsv2>
|
2023-11-30 19:52:21 -05:00
|
|
|
)
|
2020-11-26 14:47:35 -05:00
|
|
|
|
2025-11-07 19:55:39 -05:00
|
|
|
install(TARGETS commandsv2 EXPORT commandsv2)
|
|
|
|
|
export(TARGETS commandsv2 FILE commandsv2.cmake NAMESPACE commandsv2::)
|
|
|
|
|
install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/commandsv2")
|
2025-11-07 19:57:55 -05:00
|
|
|
install(DIRECTORY src/generated/main/native/include/ DESTINATION "${include_dest}/commandsv2")
|
2020-11-26 14:47:35 -05:00
|
|
|
|
2025-11-07 19:57:55 -05:00
|
|
|
configure_file(commandsv2-config.cmake.in ${WPILIB_BINARY_DIR}/commandsv2-config.cmake)
|
|
|
|
|
install(FILES ${WPILIB_BINARY_DIR}/commandsv2-config.cmake DESTINATION share/commandsv2)
|
2025-11-07 19:55:39 -05:00
|
|
|
install(EXPORT commandsv2 DESTINATION share/commandsv2)
|
2020-11-26 14:47:35 -05:00
|
|
|
|
2023-11-30 19:52:21 -05:00
|
|
|
if(WITH_TESTS)
|
2025-11-07 19:55:39 -05:00
|
|
|
wpilib_add_test(commandsv2 src/test/native/cpp)
|
|
|
|
|
target_include_directories(commandsv2_test PRIVATE src/test/native/include)
|
|
|
|
|
target_link_libraries(commandsv2_test commandsv2 googletest)
|
2023-11-30 19:52:21 -05:00
|
|
|
endif()
|