mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-24 03:39:45 +00:00
[libudis86] init
This commit is contained in:
parent
43098d47ab
commit
bfc283f5b2
56
ports/libudis86/CMakeLists.txt
Normal file
56
ports/libudis86/CMakeLists.txt
Normal file
@ -0,0 +1,56 @@
|
||||
cmake_minimum_required (VERSION 3.9)
|
||||
|
||||
project (udis86)
|
||||
|
||||
|
||||
set(
|
||||
lib_sources
|
||||
libudis86/decode.c
|
||||
libudis86/itab.c
|
||||
libudis86/syn-att.c
|
||||
libudis86/syn-intel.c
|
||||
libudis86/syn.c
|
||||
libudis86/udis86.c
|
||||
)
|
||||
|
||||
set(lib_headers
|
||||
libudis86/decode.h
|
||||
libudis86/itab.h
|
||||
libudis86/extern.h
|
||||
libudis86/syn.h
|
||||
libudis86/types.h
|
||||
libudis86/udint.h
|
||||
)
|
||||
|
||||
set(cli_srcs udcli/udcli.c)
|
||||
|
||||
include_directories(.)
|
||||
|
||||
add_library(libudis86 ${lib_sources})
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(libudis86 PRIVATE -D_USRDLL)
|
||||
endif()
|
||||
|
||||
add_executable(udcli ${cli_srcs})
|
||||
target_link_libraries(udcli libudis86)
|
||||
|
||||
|
||||
install(
|
||||
TARGETS libudis86
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_TOOLS)
|
||||
install (
|
||||
TARGETS udcli
|
||||
RUNTIME DESTINATION tools/libudis86
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES ${lib_headers} DESTINATION include/libudis86)
|
||||
install(FILES udis86.h DESTINATION include)
|
||||
endif()
|
3
ports/libudis86/CONTROL
Normal file
3
ports/libudis86/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: libudis86
|
||||
Version: 2018-01-28-56ff6c87
|
||||
Description: Disassembler Library for x86 and x86-64
|
33
ports/libudis86/portfile.cmake
Normal file
33
ports/libudis86/portfile.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO vmt/udis86
|
||||
REF 56ff6c87c11de0ffa725b14339004820556e343d
|
||||
SHA512 7a98333f9310f5f0466294bd980f03f9269c118a7557832015c59a7b6349a0eeab5642e0e6598d0be76d71f5d2d566d8b8af0ec75c26bdcff45646d60ff18e3a
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON2)
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON2} ${SOURCE_PATH}/scripts/ud_itab.py ${SOURCE_PATH}/docs/x86/optable.xml ${SOURCE_PATH}/libudis86/
|
||||
WORKING_DIRECTORY SOURCE_PATH
|
||||
LOGNAME python-${TARGET_TRIPLET}-generate-sources
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
-DDISABLE_INSTALL_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libudis86)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libudis86 RENAME copyright)
|
Loading…
Reference in New Issue
Block a user