File tree Expand file tree Collapse file tree 7 files changed +31
-10
lines changed Expand file tree Collapse file tree 7 files changed +31
-10
lines changed Original file line number Diff line number Diff line change 1
1
find_library (CLN_LIBRARY NAMES cln )
2
2
include (FindPackageHandleStandardArgs )
3
3
find_package_handle_standard_args (CLN DEFAULT_MSG CLN_LIBRARY )
4
+
5
+ if (CLN_FOUND AND NOT TARGET CLN::CLN )
6
+ add_library (CLN::CLN UNKNOWN IMPORTED )
7
+ set_property (TARGET CLN::CLN PROPERTY IMPORTED_LOCATION ${CLN_LIBRARY} )
8
+ endif ()
Original file line number Diff line number Diff line change @@ -14,12 +14,19 @@ if (USE_CVC4)
14
14
set (CVC4_LIBRARIES ${CVC4_LIBRARY} )
15
15
16
16
if (CLN_FOUND )
17
- set (CVC4_LIBRARIES ${CVC4_LIBRARIES} ${CLN_LIBRARY} )
17
+ set (CVC4_LIBRARIES ${CVC4_LIBRARIES} CLN::CLN )
18
18
endif ()
19
19
20
20
if (GMP_FOUND )
21
- set (CVC4_LIBRARIES ${CVC4_LIBRARIES} ${GMP_LIBRARY} )
21
+ set (CVC4_LIBRARIES ${CVC4_LIBRARIES} GMP::GMP )
22
22
endif ()
23
+
24
+ if (NOT TARGET CVC4::CVC4 )
25
+ add_library (CVC4::CVC4 UNKNOWN IMPORTED )
26
+ set_property (TARGET CVC4::CVC4 PROPERTY IMPORTED_LOCATION ${CVC4_LIBRARY} )
27
+ set_property (TARGET CVC4::CVC4 PROPERTY INTERFACE_LINK_LIBRARIES ${CVC4_LIBRARIES} )
28
+ set_property (TARGET CVC4::CVC4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CVC4_INCLUDE_DIR} )
29
+ endif ()
23
30
endif ()
24
31
else ()
25
32
set (CVC4_FOUND FALSE )
Original file line number Diff line number Diff line change 1
- find_library (GMP_LIBRARY NAMES gmp )
1
+ find_library (GMP_LIBRARY NAMES gmp )
2
2
include (FindPackageHandleStandardArgs )
3
3
find_package_handle_standard_args (GMP DEFAULT_MSG GMP_LIBRARY )
4
+
5
+ if (GMP_FOUND AND NOT TARGET GMP::GMP )
6
+ add_library (GMP::GMP UNKNOWN IMPORTED )
7
+ set_property (TARGET GMP::GMP PROPERTY IMPORTED_LOCATION ${GMP_LIBRARY} )
8
+ endif ()
Original file line number Diff line number Diff line change 1
1
if (USE_Z3 )
2
2
find_path (Z3_INCLUDE_DIR NAMES z3++.h PATH_SUFFIXES z3 )
3
- find_library (Z3_LIBRARY NAMES z3 )
3
+ find_library (Z3_LIBRARY NAMES z3 )
4
4
include (FindPackageHandleStandardArgs )
5
5
find_package_handle_standard_args (Z3 DEFAULT_MSG Z3_LIBRARY Z3_INCLUDE_DIR )
6
+
7
+ if (NOT TARGET Z3::Z3 )
8
+ add_library (Z3::Z3 UNKNOWN IMPORTED )
9
+ set_property (TARGET Z3::Z3 PROPERTY IMPORTED_LOCATION ${Z3_LIBRARY} )
10
+ set_property (TARGET Z3::Z3 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Z3_INCLUDE_DIR} )
11
+ endif ()
6
12
else ()
7
13
set (Z3_FOUND FALSE )
8
14
endif ()
9
- # TODO: Create IMPORTED library for Z3.
Original file line number Diff line number Diff line change @@ -51,5 +51,6 @@ ExternalProject_Add(jsoncpp-project
51
51
add_library (jsoncpp STATIC IMPORTED )
52
52
file (MAKE_DIRECTORY ${JSONCPP_INCLUDE_DIR} ) # Must exist.
53
53
set_property (TARGET jsoncpp PROPERTY IMPORTED_LOCATION ${JSONCPP_LIBRARY} )
54
+ set_property (TARGET jsoncpp PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${JSONCPP_INCLUDE_DIR} )
54
55
set_property (TARGET jsoncpp PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JSONCPP_INCLUDE_DIR} )
55
56
add_dependencies (jsoncpp jsoncpp-project )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ set(sources
12
12
)
13
13
14
14
add_library (devcore ${sources} )
15
- target_link_libraries (devcore PRIVATE jsoncpp ${Boost_FILESYSTEM_LIBRARIES} ${Boost_REGEX_LIBRARIES} ${Boost_SYSTEM_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
15
+ target_link_libraries (devcore PUBLIC jsoncpp ${Boost_FILESYSTEM_LIBRARIES} ${Boost_REGEX_LIBRARIES} ${Boost_SYSTEM_LIBRARIES} Threads::Threads )
16
16
target_include_directories (devcore PUBLIC "${CMAKE_SOURCE_DIR} " )
17
17
target_include_directories (devcore SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} )
18
18
add_dependencies (devcore solidity_BuildInfo.h )
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ set(sources
50
50
51
51
find_package (Z3 QUIET )
52
52
if (${Z3_FOUND} )
53
- include_directories (${Z3_INCLUDE_DIR} )
54
53
add_definitions (-DHAVE_Z3 )
55
54
message ("Z3 SMT solver found. This enables optional SMT checking with Z3." )
56
55
set (z3_SRCS "${CMAKE_CURRENT_SOURCE_DIR} /formal/Z3Interface.cpp" )
@@ -60,7 +59,6 @@ endif()
60
59
61
60
find_package (CVC4 QUIET )
62
61
if (${CVC4_FOUND} )
63
- include_directories (${CVC4_INCLUDE_DIR} )
64
62
add_definitions (-DHAVE_CVC4 )
65
63
message ("CVC4 SMT solver found. This enables optional SMT checking with CVC4." )
66
64
set (cvc4_SRCS "${CMAKE_CURRENT_SOURCE_DIR} /formal/CVC4Interface.cpp" )
@@ -77,9 +75,9 @@ add_library(solidity ${sources} ${z3_SRCS} ${cvc4_SRCS})
77
75
target_link_libraries (solidity PUBLIC yul evmasm langutil devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} )
78
76
79
77
if (${Z3_FOUND} )
80
- target_link_libraries (solidity PUBLIC ${Z3_LIBRARY} )
78
+ target_link_libraries (solidity PUBLIC Z3::Z3 )
81
79
endif ()
82
80
83
81
if (${CVC4_FOUND} )
84
- target_link_libraries (solidity PUBLIC ${CVC4_LIBRARIES} )
82
+ target_link_libraries (solidity PUBLIC CVC4::CVC4 )
85
83
endif ()
You can’t perform that action at this time.
0 commit comments