cmake: Fix java

* fix cmake/java.cmake
* fix <cmp>/java/CMakeLists.txt
* fix examples/tests/CMakeLists.txt
This commit is contained in:
Mizux Seiha
2022-09-22 18:07:48 +02:00
committed by Corentin Le Molgat
parent ddbbd50228
commit b65c86da8b
8 changed files with 131 additions and 81 deletions

View File

@@ -28,3 +28,10 @@ set_target_properties(jniconstraint_solver PROPERTIES
SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
POSITION_INDEPENDENT_CODE ON)
target_link_libraries(jniconstraint_solver PRIVATE ortools::ortools)
if(BUILD_TESTING)
file(GLOB JAVA_SRCS "*Test.java")
foreach(FILE_NAME IN LISTS JAVA_SRCS)
add_java_test(${FILE_NAME})
endforeach()
endif()