File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11include (cmake/CPM.cmake )
22
33function (setup_dependencies )
4- CPMAddPackage (
5- NAME capstone
6- GIT_TAG "6.0.0-Alpha7"
7- GITHUB_REPOSITORY "capstone-engine/capstone"
4+ find_package (capstone 6.0 QUIET )
85
9- OPTIONS
10- "CAPSTONE_ARCHITECTURE_DEFAULT OFF"
11- "CAPSTONE_ARM_SUPPORT ON"
12- "CAPSTONE_AARCH64_SUPPORT ON"
13- )
6+ if (capstone_FOUND)
7+ if (NOT TARGET capstone)
8+ add_library (capstone ALIAS capstone::capstone_shared )
9+ endif ()
10+ message (STATUS "Using system capstone" )
11+ else ()
12+ CPMAddPackage (
13+ NAME capstone
14+ GIT_TAG "6.0.0-Alpha7"
15+ GITHUB_REPOSITORY "capstone-engine/capstone"
16+
17+ OPTIONS
18+ "CAPSTONE_ARCHITECTURE_DEFAULT OFF"
19+ "CAPSTONE_ARM_SUPPORT ON"
20+ "CAPSTONE_AARCH64_SUPPORT ON"
21+ )
22+ endif ()
1423endfunction ()
Original file line number Diff line number Diff line change 11include (cmake/CPM.cmake )
22
33function (setup_dependencies )
4- CPMAddPackage (
5- NAME zydis
6- VERSION "4.1.1"
7- GITHUB_REPOSITORY "zyantific/zydis"
8- EXCLUDE_FROM_ALL YES
4+ find_package (zydis QUIET )
95
10- OPTIONS
11- "CMAKE_POSITION_INDEPENDENT_CODE ON"
12- "ZYDIS_BUILD_TOOLS OFF"
13- "ZYDIS_BUILD_EXAMPLES OFF"
14- )
6+ if (zydis_FOUND)
7+ if (NOT TARGET Zydis)
8+ add_library (Zydis ALIAS Zydis::Zydis )
9+ endif ()
10+ message (STATUS "Using system zydis" )
11+ else ()
12+ CPMAddPackage (
13+ NAME zydis
14+ VERSION "4.1.1"
15+ GITHUB_REPOSITORY "zyantific/zydis"
16+ EXCLUDE_FROM_ALL YES
17+
18+ OPTIONS
19+ "CMAKE_POSITION_INDEPENDENT_CODE ON"
20+ "ZYDIS_BUILD_TOOLS OFF"
21+ "ZYDIS_BUILD_EXAMPLES OFF"
22+ )
23+ endif ()
1524endfunction ()
You can’t perform that action at this time.
0 commit comments