Skip to content

Commit

Permalink
Add#vcpkg configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerl committed Apr 28, 2023
1 parent 6370e6d commit 0b68814
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
14 changes: 2 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,9 @@ set(CMAKE_CXX_STANDARD 17)
option(STATIC_BUILD "enable static build" OFF)

set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)

include(FetchContent)

FetchContent_Declare(
zero
GIT_REPOSITORY https://github.com/Hackerl/zero
GIT_TAG df739d44cacc95cf10251c0dbede56bc1f0b18bb
)

FetchContent_MakeAvailable(zero)
find_package(zero CONFIG REQUIRED)

add_executable(pangolin main.cpp ptrace/tracee.cpp ptrace/executor.cpp)
target_link_libraries(pangolin zero $<$<BOOL:${STATIC_BUILD}>:-static-pie>)
target_link_libraries(pangolin zero::zero $<$<BOOL:${STATIC_BUILD}>:-static-pie>)
12 changes: 12 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"registries": [
{
"kind": "git",
"repository": "https://github.com/Hackerl/vcpkg-registry",
"baseline": "0688d7a1a7a24bb3a65c3e7805affc84c6ed2eb4",
"packages": [
"zero"
]
}
]
}
11 changes: 11 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "pangolin",
"version": "1.0.0",
"builtin-baseline": "69efe9cc2df0015f0bb2d37d55acde4a75c9a25b",
"dependencies": [
{
"name": "zero",
"version>=": "1.0.2"
}
]
}

0 comments on commit 0b68814

Please sign in to comment.