mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:08:03 +08:00
[distorm, scylla_wrapper, devicenameresolver] init (#4170)
* distorm init * scylla wrapper init * devicenameresolver init * [devicenameresolver][distorm][scylla-wrapper] Cleanup and mark libraries as dll-only.
This commit is contained in:
parent
246bd61ba1
commit
dc65ec9e68
23
ports/devicenameresolver/CMakeLists.txt
Normal file
23
ports/devicenameresolver/CMakeLists.txt
Normal file
@ -0,0 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.8.0)
|
||||
project(DeviceNameResolver CXX)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 /DUNICODE /D_UNICODE -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
|
||||
endif()
|
||||
|
||||
include_directories(.)
|
||||
|
||||
file(GLOB DeviceNameResolver_srcs "*.cpp")
|
||||
|
||||
add_library(DeviceNameResolver ${DeviceNameResolver_srcs})
|
||||
|
||||
install(
|
||||
TARGETS DeviceNameResolver
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES DeviceNameResolver.h DESTINATION include)
|
||||
endif()
|
3
ports/devicenameresolver/CONTROL
Normal file
3
ports/devicenameresolver/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: devicenameresolver
|
||||
Version: 2016-06-26-0850d88fa6
|
||||
Description: a little library that resolves a path from a (virtual) device name.
|
29
ports/devicenameresolver/portfile.cmake
Normal file
29
ports/devicenameresolver/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
vcpkg_from_bitbucket(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mrexodia/devicenameresolver
|
||||
REF 0850d88fa6a759d79b3c859933870d9aa602aa79
|
||||
SHA512 9161411d3c8c17f49f5ff9482a007a6608872c948ef856aa7076a45c246e8d777e4cd6b54169d9c1b9e99e7b383436e1a084e168fafff1ca5f2b28260bac1452
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/DeviceNameResolver.h _contents)
|
||||
string(REPLACE "__declspec(dllexport)" "" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/DeviceNameResolver.h "${_contents}")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/devicenameresolver RENAME copyright)
|
37
ports/distorm/CMakeLists.txt
Normal file
37
ports/distorm/CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
||||
cmake_minimum_required(VERSION 3.8.0)
|
||||
project(distorm C)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
|
||||
endif()
|
||||
|
||||
include_directories(include src)
|
||||
|
||||
add_library(distorm
|
||||
src/decoder.c
|
||||
src/distorm.c
|
||||
src/instructions.c
|
||||
src/insts.c
|
||||
src/mnemonics.c
|
||||
src/operands.c
|
||||
src/prefix.c
|
||||
src/textdefs.c
|
||||
src/wstring.c
|
||||
)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(distorm PRIVATE -DDISTORM_DYNAMIC=1 -DSUPPORT_64BIT_OFFSET=1)
|
||||
else()
|
||||
target_compile_definitions(distorm PRIVATE -DDISTORM_STATIC=1 -DSUPPORT_64BIT_OFFSET=1)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS distorm
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES include/distorm.h include/mnemonics.h DESTINATION include)
|
||||
endif()
|
3
ports/distorm/CONTROL
Normal file
3
ports/distorm/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: distorm
|
||||
Version: 2018-08-26-16e6f435-1
|
||||
Description: Powerful Disassembler Library For x86/AMD64
|
23
ports/distorm/portfile.cmake
Normal file
23
ports/distorm/portfile.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO gdabah/distorm
|
||||
REF 16e6f43509616234b8478187c00569a65f15287c
|
||||
SHA512 2ecbacaaf07a07cf725adf25732807476fdaa1d3a44994a90c70ddbd2ec3db4c75c88b28188f8a48a0fb7b4fe79ae4f7b717cf72b3a0154232310ed56677a9a3
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/distorm RENAME copyright)
|
32
ports/scylla-wrapper/CMakeLists.txt
Normal file
32
ports/scylla-wrapper/CMakeLists.txt
Normal file
@ -0,0 +1,32 @@
|
||||
cmake_minimum_required(VERSION 3.8.0)
|
||||
project(scylla_wrapper CXX)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 /DUNICODE /D_UNICODE -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
|
||||
endif()
|
||||
|
||||
find_library(DISTORM_LIBRARY distorm)
|
||||
find_path(DISTORM_INCLUDE_DIR distorm.h)
|
||||
|
||||
include_directories(scylla_wrapper ${DISTORM_INCLUDE_DIR})
|
||||
|
||||
file(GLOB scylla_wrapper_srcs "scylla_wrapper/*.cpp")
|
||||
|
||||
add_library(scylla_wrapper ${scylla_wrapper_srcs})
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(scylla_wrapper PRIVATE -DSCYLLA_WRAPPER_EXPORTS)
|
||||
endif()
|
||||
|
||||
target_link_libraries(scylla_wrapper PRIVATE ${DISTORM_LIBRARY})
|
||||
|
||||
install(
|
||||
TARGETS scylla_wrapper
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES scylla_wrapper/scylla_wrapper.h DESTINATION include)
|
||||
endif()
|
4
ports/scylla-wrapper/CONTROL
Normal file
4
ports/scylla-wrapper/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: scylla-wrapper
|
||||
Version: 2018-08-26-16e6f435
|
||||
Build-Depends: distorm
|
||||
Description: This is a wrapper around Scylla. It exports functions for IAT fixing, dumping and PE rebuilding. based on http://github.com/NtQuery/Scylla commit 0f6b7198be (v0.9.6b).
|
31
ports/scylla-wrapper/portfile.cmake
Normal file
31
ports/scylla-wrapper/portfile.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
# scylla_wrapper_dll supplies a DllMain
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
vcpkg_from_bitbucket(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO cypherpunk/scylla_wrapper_dll
|
||||
REF 4ad953ec04108269f1d80a91b2723b3e22d1b4d2
|
||||
SHA512 d7cb72e097e86e96cf0a8f463c0f839c9608fa4276bc1e2e984290984bcfe8a5b2257b1511259cb78802819fadf2c1001dc3011ee2c6dc9dfcbdb561d34e0c35
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(REMOVE
|
||||
${SOURCE_PATH}/scylla_wrapper_dll/distorm.h
|
||||
${SOURCE_PATH}/scylla_wrapper_dll/distorm_x64.lib
|
||||
${SOURCE_PATH}/scylla_wrapper_dll/distorm_x86.lib
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/scylla-wrapper RENAME copyright)
|
Loading…
x
Reference in New Issue
Block a user