mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[build] CMake: simplify source JAR creation and install (#6831)
Bump required minimum CMake version to 3.21.
This commit is contained in:
@@ -18,3 +18,16 @@ if(WITH_JAVA)
|
||||
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
|
||||
OUTPUT_NAME wpiunits-sources
|
||||
)
|
||||
set_property(TARGET wpiunits_src_jar PROPERTY FOLDER "java")
|
||||
|
||||
install_jar(wpiunits_src_jar DESTINATION ${java_lib_dest})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user