Rework CMake dependencies management (Fix #1116)

- 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
This commit is contained in:
Corentin Le Molgat
2019-04-03 17:26:27 +02:00
parent d9d16afe28
commit a49b9143a4
30 changed files with 729 additions and 533 deletions

View File

@@ -9,3 +9,7 @@ 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()