mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-17 00:18:15 +08:00
65c66cd748
* [capstone] update to 5.0.0 alpha * [triton] upgrade to support capstone 5 * [triton] fix incorrect library linkage * [triton] bump port version * [capstone] Silence CRT Secure Function warning * [capstone] update to 5.0.0-rc2 Co-authored-by: MACHIZAUD Andréa <andrea.machizaud@adobe.com>
61 lines
1.9 KiB
Diff
61 lines
1.9 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 966ded8..199a3ba 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -129,8 +129,8 @@ endif()
|
|
|
|
# Find Capstone
|
|
message(STATUS "Compiling with Capstone")
|
|
-find_package(CAPSTONE REQUIRED)
|
|
-include_directories(${CAPSTONE_INCLUDE_DIRS})
|
|
+find_package(CAPSTONE CONFIG REQUIRED)
|
|
+set(CAPSTONE_LIBRARIES capstone::capstone)
|
|
|
|
# Find boost
|
|
message(STATUS "Compiling with Boost headers")
|
|
diff --git a/src/libtriton/Config.cmake.in b/src/libtriton/Config.cmake.in
|
|
index 5df941e..23c5a27 100644
|
|
--- a/src/libtriton/Config.cmake.in
|
|
+++ b/src/libtriton/Config.cmake.in
|
|
@@ -19,6 +19,7 @@ message(STATUS "Found Triton: ${CMAKE_CURRENT_LIST_DIR}/tritonConfig.cmake (foun
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
find_dependency(Boost)
|
|
+find_dependency(capstone CONFIG)
|
|
if (@Z3_INTERFACE@)
|
|
find_dependency(Z3 CONFIG)
|
|
endif()
|
|
@@ -26,9 +27,6 @@ endif()
|
|
# Triton include
|
|
include_directories("@CMAKE_INSTALL_PREFIX@/include")
|
|
|
|
-# Capstone include
|
|
-include_directories("@CAPSTONE_INCLUDE_DIRS@")
|
|
-
|
|
# Python include directories
|
|
if (TRITON_PYTHON_BINDINGS)
|
|
include_directories("@PYTHON_INCLUDE_DIRS@")
|
|
diff --git a/src/libtriton/includes/triton/externalLibs.hpp b/src/libtriton/includes/triton/externalLibs.hpp
|
|
index 65678a0..d055f88 100644
|
|
--- a/src/libtriton/includes/triton/externalLibs.hpp
|
|
+++ b/src/libtriton/includes/triton/externalLibs.hpp
|
|
@@ -29,14 +29,10 @@ namespace triton {
|
|
* \addtogroup extlibs
|
|
* @{
|
|
*/
|
|
- #if defined(__unix__) || defined(__APPLE__)
|
|
- #include <capstone/arm64.h>
|
|
- #include <capstone/arm.h>
|
|
- #include <capstone/capstone.h>
|
|
- #include <capstone/x86.h>
|
|
- #elif _WIN32
|
|
- #include <capstone.h>
|
|
- #endif
|
|
+ #include <capstone/arm64.h>
|
|
+ #include <capstone/arm.h>
|
|
+ #include <capstone/capstone.h>
|
|
+ #include <capstone/x86.h>
|
|
/*! @} End of capstone namespace */
|
|
};
|
|
|