2018-05-02 21:15:30 -07:00
|
|
|
project(cameraserver)
|
|
|
|
|
|
2019-06-23 12:44:28 -07:00
|
|
|
include(CompileWarnings)
|
|
|
|
|
include(AddTest)
|
|
|
|
|
|
2023-11-30 19:52:21 -05:00
|
|
|
file(GLOB_RECURSE cameraserver_native_src src/main/native/cpp/*.cpp)
|
2018-05-02 21:15:30 -07:00
|
|
|
add_library(cameraserver ${cameraserver_native_src})
|
2018-10-27 00:19:38 -07:00
|
|
|
set_target_properties(cameraserver PROPERTIES DEBUG_POSTFIX "d")
|
2023-11-30 19:52:21 -05:00
|
|
|
target_include_directories(
|
|
|
|
|
cameraserver
|
|
|
|
|
PUBLIC
|
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/include>
|
|
|
|
|
$<INSTALL_INTERFACE:${include_dest}/cameraserver>
|
|
|
|
|
)
|
2019-06-23 12:44:28 -07:00
|
|
|
wpilib_target_warnings(cameraserver)
|
2018-05-02 21:15:30 -07:00
|
|
|
target_link_libraries(cameraserver PUBLIC ntcore cscore wpiutil ${OpenCV_LIBS})
|
|
|
|
|
|
|
|
|
|
set_property(TARGET cameraserver PROPERTY FOLDER "libraries")
|
|
|
|
|
|
2023-09-18 01:17:32 +02:00
|
|
|
install(TARGETS cameraserver EXPORT cameraserver)
|
2024-04-10 22:04:22 -07:00
|
|
|
export(TARGETS cameraserver FILE cameraserver.cmake NAMESPACE cameraserver::)
|
2018-05-02 21:15:30 -07:00
|
|
|
install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/cameraserver")
|
|
|
|
|
|
2023-11-30 19:52:21 -05:00
|
|
|
configure_file(cameraserver-config.cmake.in ${WPILIB_BINARY_DIR}/cameraserver-config.cmake)
|
2023-11-21 14:48:32 -05:00
|
|
|
install(FILES ${WPILIB_BINARY_DIR}/cameraserver-config.cmake DESTINATION share/cameraserver)
|
|
|
|
|
install(EXPORT cameraserver DESTINATION share/cameraserver)
|
2018-12-09 11:44:45 -08:00
|
|
|
|
|
|
|
|
file(GLOB multiCameraServer_src multiCameraServer/src/main/native/cpp/*.cpp)
|
|
|
|
|
add_executable(multiCameraServer ${multiCameraServer_src})
|
2019-06-23 12:44:28 -07:00
|
|
|
wpilib_target_warnings(multiCameraServer)
|
2018-12-09 11:44:45 -08:00
|
|
|
target_link_libraries(multiCameraServer cameraserver)
|
2019-06-10 20:04:34 -07:00
|
|
|
|
|
|
|
|
set_property(TARGET multiCameraServer PROPERTY FOLDER "examples")
|
2019-06-23 12:44:28 -07:00
|
|
|
|
2023-11-30 19:52:21 -05:00
|
|
|
if(WITH_TESTS)
|
2019-06-23 12:44:28 -07:00
|
|
|
wpilib_add_test(cameraserver src/test/native/cpp)
|
2024-07-19 00:10:26 -04:00
|
|
|
target_link_libraries(cameraserver_test cameraserver googletest)
|
2019-06-23 12:44:28 -07:00
|
|
|
endif()
|