aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindZ3.cmake
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-19 00:45:23 +0800
committerGitHub <noreply@github.com>2018-12-19 00:45:23 +0800
commite970590675f0d4950e58d93852cd60e4fae98d8c (patch)
tree171bc63a61bc93c9dfb055437e6074e83b7db7f2 /cmake/FindZ3.cmake
parentd959407f66d91ec5f7b05947193d58ae5b9468a9 (diff)
parent2f698b6efe1b1bb932b238a5dd912b290978ac72 (diff)
downloaddexon-solidity-e970590675f0d4950e58d93852cd60e4fae98d8c.tar
dexon-solidity-e970590675f0d4950e58d93852cd60e4fae98d8c.tar.gz
dexon-solidity-e970590675f0d4950e58d93852cd60e4fae98d8c.tar.bz2
dexon-solidity-e970590675f0d4950e58d93852cd60e4fae98d8c.tar.lz
dexon-solidity-e970590675f0d4950e58d93852cd60e4fae98d8c.tar.xz
dexon-solidity-e970590675f0d4950e58d93852cd60e4fae98d8c.tar.zst
dexon-solidity-e970590675f0d4950e58d93852cd60e4fae98d8c.zip
Merge pull request #5664 from ethereum/cmakeUpdates
Use imported CMake targets.
Diffstat (limited to 'cmake/FindZ3.cmake')
-rw-r--r--cmake/FindZ3.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/FindZ3.cmake b/cmake/FindZ3.cmake
index c017cac2..ad34cbc3 100644
--- a/cmake/FindZ3.cmake
+++ b/cmake/FindZ3.cmake
@@ -1,9 +1,14 @@
if (USE_Z3)
find_path(Z3_INCLUDE_DIR NAMES z3++.h PATH_SUFFIXES z3)
- find_library(Z3_LIBRARY NAMES z3 )
+ find_library(Z3_LIBRARY NAMES z3)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Z3 DEFAULT_MSG Z3_LIBRARY Z3_INCLUDE_DIR)
+
+ if (NOT TARGET Z3::Z3)
+ add_library(Z3::Z3 UNKNOWN IMPORTED)
+ set_property(TARGET Z3::Z3 PROPERTY IMPORTED_LOCATION ${Z3_LIBRARY})
+ set_property(TARGET Z3::Z3 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Z3_INCLUDE_DIR})
+ endif()
else()
set(Z3_FOUND FALSE)
endif()
-# TODO: Create IMPORTED library for Z3.