Fix FindCaDiCaL script (#8838)
authorGereon Kremer <gkremer@cs.stanford.edu>
Tue, 31 May 2022 18:23:33 +0000 (11:23 -0700)
committerGitHub <noreply@github.com>
Tue, 31 May 2022 18:23:33 +0000 (11:23 -0700)
This fixes issues with finding a system-installed cadical.
Fixes #8836.

cmake/FindCaDiCaL.cmake

index 09523eb39047a6803f14ed6d0d212a00727913f4..f6be210fdf38a4ec0d4c81839d632e813ecce833 100644 (file)
@@ -26,10 +26,10 @@ if(CaDiCaL_INCLUDE_DIR AND CaDiCaL_LIBRARIES)
   set(CaDiCaL_FOUND_SYSTEM TRUE)
 
   # Unfortunately it is not part of the headers
-  find_library(CaDiCaL_BINARY NAMES cadical)
+  find_program(CaDiCaL_BINARY NAMES cadical)
   if(CaDiCaL_BINARY)
     execute_process(
-      COMMAND ${CaDiCaL_BINARY} --version OUTPUT_VARIALE CaDiCaL_VERSION
+      COMMAND ${CaDiCaL_BINARY} --version OUTPUT_VARIABLE CaDiCaL_VERSION
     )
   else()
     set(CaDiCaL_VERSION "")