- By default don't build dependencies simply call find_package() - By default only build C++ library - IF building Python, Java or .Net wrapper then force build dependencies - Build dependencies as STATIC - Build and Install (in CMAKE_BINARY_DIR) dependencies at configure time
16 lines
278 B
CMake
16 lines
278 B
CMake
if(NOT BUILD_JAVA)
|
|
return()
|
|
endif()
|
|
|
|
find_package(SWIG REQUIRED)
|
|
find_package(JAVA REQUIRED)
|
|
find_package(JNI REQUIRED)
|
|
|
|
if(NOT TARGET ortools::ortools)
|
|
message(FATAL_ERROR "Java: missing ortools TARGET")
|
|
endif()
|
|
|
|
if(BUILD_TESTING)
|
|
add_subdirectory(examples/java)
|
|
endif()
|