Skip to content

Commit

Permalink
Also applied backwards compatibility of linking Z3 package to configu…
Browse files Browse the repository at this point in the history
…ration cmake file
  • Loading branch information
Johanmyst committed Jun 3, 2024
1 parent f34da40 commit 9d8ef32
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions cmake/SVFConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,42 @@ message(STATUS "Found SVF Package:

include(CMakeFindDependencyMacro)


find_dependency(
Z3
CONFIG
REQUIRED
HINTS
"${Z3_DIR}"
"$ENV{Z3_DIR}"
PATH_SUFFIXES
"lib"
"lib/cmake"
"lib/cmake/z3")
${Z3_DIR}
$ENV{Z3_DIR})
if(Z3_FOUND)
message(STATUS "Found Z3 CMake package:
Z3 Version Major: ${Z3_VERSION_MAJOR}
Z3 Version Minor: ${Z3_VERSION_MINOR}
Z3 Version Patch: ${Z3_VERSION_PATCH}
Z3 Version Tweak: ${Z3_VERSION_TWEAK}
Z3 Version String: ${Z3_VERSION_STRING}
Z3 C Include Directories: ${Z3_C_INCLUDE_DIRS}
Z3 C++ Include Directories: ${Z3_CXX_INCLUDE_DIRS}
Z3 Libraries: ${Z3_LIBRARIES}")
else()
find_library(
Z3_LIBRARIES REQUIRED
NAMES z3
HINTS ${Z3_DIR} ENV Z3_DIR
PATH_SUFFIXES bin lib)
find_path(
Z3_INCLUDES REQUIRED
NAMES z3++.h
HINTS ${Z3_DIR} ENV Z3_DIR
PATH_SUFFIXES include z3)
message(STATUS "Z3 STATUS:
Z3 library file: ${Z3_LIBRARIES}
Z3 include directory: ${Z3_INCLUDES}")

# Add the Z3 include directory and link the Z3 library to all targets of SVF
set(CMAKE_INSTALL_RPATH ${Z3_INCLUDES})
include_directories(SYSTEM ${Z3_INCLUDES})
endif()

find_dependency(
LLVM
Expand Down

0 comments on commit 9d8ef32

Please sign in to comment.