From: Mathias Preiner Date: Wed, 9 Oct 2019 00:55:05 +0000 (-0700) Subject: cmake: Fix include of CVC4JavaTargets.cmake. (#3373) X-Git-Tag: cvc5-1.0.0~3901 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d4c28c9211db363b716b33954644d200b91dfd8;p=cvc5.git cmake: Fix include of CVC4JavaTargets.cmake. (#3373) Only include Java targets if Java bindings are enabled. --- diff --git a/cmake/CVC4Config.cmake.in b/cmake/CVC4Config.cmake.in index 86fbffff5..f60e99736 100644 --- a/cmake/CVC4Config.cmake.in +++ b/cmake/CVC4Config.cmake.in @@ -1,10 +1,12 @@ @PACKAGE_INIT@ +set(CVC4_BINDINGS_JAVA @BUILD_BINDINGS_JAVA@) + if(NOT TARGET CVC4::cvc4) include(${CMAKE_CURRENT_LIST_DIR}/CVC4Targets.cmake) endif() -if(NOT TARGET CVC4::cvc4jar) +if(CVC4_BINDINGS_JAVA AND NOT TARGET CVC4::cvc4jar) set_and_check(CVC4_JNI_PATH "@PACKAGE_LIBRARY_INSTALL_DIR@") include(${CMAKE_CURRENT_LIST_DIR}/CVC4JavaTargets.cmake) endif()