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. ```
37 lines
1.1 KiB
CMake
37 lines
1.1 KiB
CMake
project(wpiunits)
|
|
|
|
# Java bindings
|
|
if(WITH_JAVA)
|
|
include(UseJava)
|
|
|
|
file(GLOB_RECURSE JAVA_SOURCES src/main/java/*.java src/generated/main/java/*.java)
|
|
|
|
add_jar(
|
|
wpiunits_jar
|
|
${JAVA_SOURCES}
|
|
OUTPUT_NAME wpiunits
|
|
OUTPUT_DIR ${WPILIB_BINARY_DIR}/${java_lib_dest}
|
|
)
|
|
set_property(TARGET wpiunits_jar PROPERTY FOLDER "java")
|
|
|
|
install_jar(wpiunits_jar DESTINATION ${java_lib_dest})
|
|
install_jar_exports(TARGETS wpiunits_jar FILE wpiunits.cmake DESTINATION share/wpiunits)
|
|
install(FILES wpiunits-config.cmake DESTINATION share/wpiunits)
|
|
endif()
|
|
|
|
if(WITH_JAVA_SOURCE)
|
|
include(UseJava)
|
|
include(CreateSourceJar)
|
|
add_source_jar(
|
|
wpiunits_src_jar
|
|
BASE_DIRECTORIES
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/main/java
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/generated/main/java
|
|
OUTPUT_NAME wpiunits-sources
|
|
OUTPUT_DIR ${WPILIB_BINARY_DIR}/${java_lib_dest}
|
|
)
|
|
set_property(TARGET wpiunits_src_jar PROPERTY FOLDER "java")
|
|
|
|
install_jar(wpiunits_src_jar DESTINATION ${java_lib_dest})
|
|
endif()
|