Skip to content

Commit

Permalink
[libdisasm][breakpad] Initial commit of breakpad. Improvements to lib…
Browse files Browse the repository at this point in the history
…disasm.
  • Loading branch information
ras0219-msft committed Feb 19, 2018
1 parent 12f19c7 commit 0f60786
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 5 deletions.
49 changes: 49 additions & 0 deletions ports/breakpad/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
cmake_minimum_required(VERSION 3.8)
project(breakpad CXX)

add_definitions(
-DNOMINMAX
-DUNICODE
-DWIN32_LEAN_AND_MEAN
-D_CRT_SECURE_NO_WARNINGS
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
)

set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" "Release" DEFAULT_INSTALL_HEADERS)
option(INSTALL_HEADERS "Install header files" ${DEFAULT_INSTALL_HEADERS})

file(GLOB_RECURSE SOURCES src/processor/*.cc)
list(FILTER SOURCES EXCLUDE REGEX
"_unittest|synth_minidump|/tests|/testdata|/linux|/mac|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk")

find_library(LIBDISASM_LIB NAMES libdisasmd libdisasm)

add_library(libbreakpad ${SOURCES})
target_link_libraries(libbreakpad PRIVATE ${LIBDISASM_LIB})

target_include_directories(libbreakpad
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>
)

install(TARGETS libbreakpad EXPORT unofficial-breakpad-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

if(INSTALL_HEADERS)
install(DIRECTORY src/google_breakpad DESTINATION include)
endif()

install(
EXPORT unofficial-breakpad-targets
FILE unofficial-breakpad-config.cmake
NAMESPACE unofficial::breakpad::
DESTINATION share/unofficial-breakpad
)
4 changes: 4 additions & 0 deletions ports/breakpad/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: breakpad
Version: 2018-2-19
Build-Depends: libdisasm
Description: a set of client and server components which implement a crash-reporting system.
24 changes: 24 additions & 0 deletions ports/breakpad/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/breakpad
REF 6bb6c9b26afd9844b9e35fcaa39fb24893e7abb5
SHA512 a6a786c2cabb1fd2749d79215c7a3024ae6d1a894166060b22869cd3ee3010edb3e0613c0aeea254580554f402d919ed630ee088c53a1f218e01a7280ad29fec
HEAD_REF master
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-breakpad TARGET_PATH share/unofficial-breakpad)

vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/breakpad RENAME copyright)
11 changes: 7 additions & 4 deletions ports/libdisasm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
cmake_minimum_required(VERSION 3.9)
project(libdisasm)
set(
SRCS
project(libdisasm C)

set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

set(SRCS
ia32_implicit.c
ia32_implicit.h
ia32_insn.c
Expand Down Expand Up @@ -32,7 +35,7 @@ set(

include_directories(libdisasm)

add_library(libdisasm ${SRCS})
add_library(libdisasm ${SRCS})

install(
TARGETS libdisasm
Expand Down
2 changes: 1 addition & 1 deletion ports/libdisasm/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: libdisasm
Version: 0.23
Version: 0.23-1
Description: x86 Disassembler Library.
1 change: 1 addition & 0 deletions ports/libdisasm/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ 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
)

Expand Down

0 comments on commit 0f60786

Please sign in to comment.