vcpkg/ports/triton/003-fix-python.patch
Alberto Garcia Illera d34bda3300
[triton] New version with no boost dependencies (#24081)
* update Triton version

* add vcpkg versioning
2022-04-19 09:38:20 -07:00

29 lines
1.9 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8da1610..40ab12c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,6 @@ if(PYTHON_BINDINGS)
find_package(PythonInterp ${PYTHON_VERSION} REQUIRED)
find_package(PythonLibs ${PYTHON_VERSION} REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
- add_definitions("-DPYTHON_LIBRARIES=\"${PYTHON_LIBRARIES}\"")
cmake_path(GET PYTHON_LIBRARY PARENT_PATH PYTHON_LIB_DIR)
cmake_path(GET PYTHON_LIBRARY STEM LAST_ONLY PYTHON_LIB_NAME)
string(REGEX REPLACE "^lib" "" PYTHON_LIB_NAME ${PYTHON_LIB_NAME})
diff --git a/src/libtriton/CMakeLists.txt b/src/libtriton/CMakeLists.txt
index 7101cce8..a052b066 100644
--- a/src/libtriton/CMakeLists.txt
+++ b/src/libtriton/CMakeLists.txt
@@ -330,9 +330,9 @@ if(PYTHON_BINDINGS)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sysconfig import get_path; print(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/triton${PYTHON_SUFFIX} DESTINATION ${PYTHON_SITE_PACKAGES})
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_CONFIG_NAME}/triton${PYTHON_SUFFIX} DESTINATION share/triton)
else()
- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/triton${PYTHON_SUFFIX} DESTINATION ${PYTHON_SITE_PACKAGES})
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/triton${PYTHON_SUFFIX} DESTINATION share/triton)
endif()
else()
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import version_info; print(f'lib/python{version_info[0]}.{version_info[1]}/site-packages')" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)