mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
``` CMake Warning (dev) at /usr/share/cmake/Modules/UseJava.cmake:716 (cmake_parse_arguments): The OUTPUT_DIR keyword was followed by an empty string or no value at all. Policy CMP0174 is not set, so cmake_parse_arguments() will unset the _add_jar_OUTPUT_DIR variable rather than setting it to an empty string. Call Stack (most recent call first): cmake/modules/CreateSourceJar.cmake:29:EVAL:1 (add_jar) cmake/modules/CreateSourceJar.cmake:29 (cmake_language) wpiannotations/CMakeLists.txt:29 (add_source_jar) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/share/cmake/Modules/UseJava.cmake:716 (cmake_parse_arguments): The OUTPUT_DIR keyword was followed by an empty string or no value at all. Policy CMP0174 is not set, so cmake_parse_arguments() will unset the _add_jar_OUTPUT_DIR variable rather than setting it to an empty string. Call Stack (most recent call first): cmake/modules/CreateSourceJar.cmake:29:EVAL:1 (add_jar) cmake/modules/CreateSourceJar.cmake:29 (cmake_language) wpiunits/CMakeLists.txt:25 (add_source_jar) This warning is for project developers. Use -Wno-dev to suppress it. ```
39 lines
1.1 KiB
CMake
39 lines
1.1 KiB
CMake
project(wpiannotations)
|
|
|
|
# Java bindings
|
|
if(WITH_JAVA)
|
|
include(UseJava)
|
|
|
|
file(GLOB_RECURSE JAVA_SOURCES src/main/java/*.java)
|
|
|
|
add_jar(
|
|
wpiannotations_jar
|
|
${JAVA_SOURCES}
|
|
OUTPUT_NAME wpiannotations
|
|
OUTPUT_DIR ${WPILIB_BINARY_DIR}/${java_lib_dest}
|
|
)
|
|
set_property(TARGET wpiannotations_jar PROPERTY FOLDER "java")
|
|
|
|
install_jar(wpiannotations_jar DESTINATION ${java_lib_dest})
|
|
install_jar_exports(
|
|
TARGETS wpiannotations_jar
|
|
FILE wpiannotations.cmake
|
|
DESTINATION share/wpiannotations
|
|
)
|
|
install(FILES wpiannotations-config.cmake DESTINATION share/wpiannotations)
|
|
endif()
|
|
|
|
if(WITH_JAVA_SOURCE)
|
|
include(UseJava)
|
|
include(CreateSourceJar)
|
|
add_source_jar(
|
|
wpiannotations_src_jar
|
|
BASE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/src/main/java
|
|
OUTPUT_NAME wpiannotations-sources
|
|
OUTPUT_DIR ${WPILIB_BINARY_DIR}/${java_lib_dest}
|
|
)
|
|
set_property(TARGET wpiannotations_src_jar PROPERTY FOLDER "java")
|
|
|
|
install_jar(wpiannotations_src_jar DESTINATION ${java_lib_dest})
|
|
endif()
|