Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libmem] Update to 5.0.4 #43179

Merged
merged 73 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
db96f43
init
luadebug Jan 9, 2025
736f98b
new ver
luadebug Jan 9, 2025
825f4ce
Merge branch 'master' of https://github.com/luadebug/vcpkg
luadebug Jan 9, 2025
f1248a5
test port
luadebug Jan 9, 2025
ae4dd45
fmt
luadebug Jan 9, 2025
2c945fb
fmt
luadebug Jan 9, 2025
f1fd1a1
fmt
luadebug Jan 9, 2025
448ea19
fmt
luadebug Jan 9, 2025
b2c9c94
fmt
luadebug Jan 9, 2025
e707698
fmt
luadebug Jan 9, 2025
160b4c3
ver
luadebug Jan 9, 2025
e8a4d59
fmt
luadebug Jan 9, 2025
68c26b1
ver
luadebug Jan 9, 2025
fa83b23
fmt
luadebug Jan 9, 2025
8c348ae
ver
luadebug Jan 9, 2025
e4e98ae
fmt
luadebug Jan 9, 2025
9258741
ver
luadebug Jan 9, 2025
4f70f94
fix
luadebug Jan 9, 2025
65b6213
ver
luadebug Jan 9, 2025
3e9dd78
check supports
luadebug Jan 9, 2025
9797f74
ver
luadebug Jan 9, 2025
3739797
finish up
luadebug Jan 9, 2025
8bb2ff4
fixup
luadebug Jan 9, 2025
fdb74a0
ver
luadebug Jan 9, 2025
5d23159
fixup
luadebug Jan 9, 2025
216e6ab
ver
luadebug Jan 9, 2025
b39af74
clean
luadebug Jan 9, 2025
e5e936b
ver
luadebug Jan 9, 2025
7c51936
test
luadebug Jan 9, 2025
6f744e2
ver
luadebug Jan 9, 2025
8b10afd
fixup test port
luadebug Jan 9, 2025
20e5ee9
test
luadebug Jan 9, 2025
a590ea1
ver
luadebug Jan 9, 2025
26fca93
test
luadebug Jan 9, 2025
9af0319
turn back
luadebug Jan 9, 2025
cc2a6c8
check
luadebug Jan 9, 2025
eff72ee
test
luadebug Jan 9, 2025
00f71c1
ver
luadebug Jan 9, 2025
ec7368d
clean
luadebug Jan 9, 2025
89f4880
ver
luadebug Jan 9, 2025
fb6abc1
fixup
luadebug Jan 9, 2025
e068121
ver
luadebug Jan 9, 2025
124dcb8
fixup
luadebug Jan 9, 2025
c7901a9
ver
luadebug Jan 9, 2025
8978723
check
luadebug Jan 9, 2025
e7e18b4
ver
luadebug Jan 9, 2025
3abe478
fixup
luadebug Jan 9, 2025
ddb8c3b
Update vcpkg.json
luadebug Jan 9, 2025
0b3b318
Update vcpkg.json
luadebug Jan 9, 2025
48b2767
fixup configure_file
luadebug Jan 9, 2025
b3f17b1
Update 0001-CMakeLists.patch
luadebug Jan 9, 2025
d71c51d
test
luadebug Jan 9, 2025
77b23b7
test
luadebug Jan 10, 2025
653a13f
test
luadebug Jan 10, 2025
98acc08
test
luadebug Jan 10, 2025
bab93e3
fixup namespace
luadebug Jan 10, 2025
89527f3
test
luadebug Jan 10, 2025
738f7fd
Merge branch 'master' of https://github.com/luadebug/vcpkg
luadebug Jan 10, 2025
454dac8
ver
luadebug Jan 10, 2025
7bb7651
test
luadebug Jan 10, 2025
de84458
ver
luadebug Jan 10, 2025
58c0eb3
test
luadebug Jan 10, 2025
9923aac
ver
luadebug Jan 10, 2025
5b74477
test
luadebug Jan 10, 2025
029a558
ver
luadebug Jan 10, 2025
5b65bcc
test
luadebug Jan 10, 2025
923c15d
ver
luadebug Jan 10, 2025
d093339
fixup
luadebug Jan 10, 2025
a571994
ver
luadebug Jan 10, 2025
3beaa17
fixup
luadebug Jan 10, 2025
f32b001
ver
luadebug Jan 10, 2025
9d9a437
cleanup
luadebug Jan 10, 2025
0882a67
fmt
luadebug Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
287 changes: 116 additions & 171 deletions ports/libmem/0001-CMakeLists.patch
Original file line number Diff line number Diff line change
@@ -1,171 +1,116 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.22.1)

-include(ExternalProject)
+

project(libmem
LANGUAGES
@@ -23,13 +23,23 @@ option(LIBMEM_DEEP_TESTS
OFF
)

+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(targets_export_name libmem-target)
+
+if (MSVC AND NOT(BUILD_SHARED_LIBS))
+ add_definitions(/DLM_EXPORT)
+elseif(NOT(MSVC) AND BUILD_SHARED_LIBS)
+ add_definitions(-DLM_EXPORT)
+endif()
+if(0)
option(LIBMEM_BUILD_STATIC
"Build a static library"
OFF
)
-
+endif()
set(LIBMEM_ARCH ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Force a specific architecture")
-
+if(0)
message(STATUS
"[*] Architecture: ${LIBMEM_ARCH}"
)
@@ -65,13 +75,17 @@ add_library(capstone STATIC IMPORTED)
set_target_properties(capstone PROPERTIES IMPORTED_LOCATION ${CAPSTONE_IMPORT_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}capstone${CMAKE_STATIC_LIBRARY_SUFFIX})
add_library(keystone STATIC IMPORTED)
set_target_properties(keystone PROPERTIES IMPORTED_LOCATION ${KEYSTONE_IMPORT_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}keystone${CMAKE_STATIC_LIBRARY_SUFFIX})
+endif()
+find_package(PkgConfig)
+pkg_check_modules(keystone REQUIRED keystone)
+find_package(capstone CONFIG REQUIRED)
# End of external dependencies
-
set(LIBMEM_DIR "${PROJECT_SOURCE_DIR}")
+set(LLVM_DEM_DIR "${LIBMEM_DIR}/external/llvm")
set(LIBMEM_INC "${LIBMEM_DIR}/include")
set(INTERNAL_DIR "${LIBMEM_DIR}/internal")
set(COMMON_DIR "${LIBMEM_DIR}/src/common")
-
+file(GLOB_RECURSE LLVM_DEM_SRC "${LLVM_DEM_DIR}/lib/*.cpp")
if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
file(GLOB_RECURSE LIBMEM_SRC "${LIBMEM_DIR}/src/win/*.c" "${LIBMEM_DIR}/src/common/*.c" "${LIBMEM_DIR}/src/common/*.cpp" "${INTERNAL_DIR}/winutils/*.c" "${INTERNAL_DIR}/demangler/*.cpp")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
@@ -89,16 +103,13 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
endif()
file(GLOB LIBMEM_SRC ${LIBMEM_ARCH_SRC} "${LIBMEM_DIR}/src/freebsd/*.c" "${LIBMEM_DIR}/src/freebsd/ptrace/*.c" "${LIBMEM_DIR}/src/common/*.c" "${LIBMEM_DIR}/src/common/*.cpp" "${INTERNAL_DIR}/posixutils/*.c" "${INTERNAL_DIR}/elfutils/*.c" "${INTERNAL_DIR}/demangler/*.cpp")
endif()
-set(LIBMEM_DEPS
- capstone
- keystone
- llvm
-)

-if (LIBMEM_BUILD_STATIC)
+file(GLOB_RECURSE LIBMEM_PUBLIC_HEADERS "${LIBMEM_INC}/libmem/*.h" "${LIBMEM_INC}/libmem/*.hpp")
+
+if (0)
add_library(libmem STATIC ${LIBMEM_SRC})
else()
- add_library(libmem SHARED ${LIBMEM_SRC})
+ add_library(libmem ${LIBMEM_SRC} ${LLVM_DEM_SRC})
endif()
target_include_directories(libmem PRIVATE "${LIBMEM_DIR}/src" "${INTERNAL_DIR}" "${COMMON_DIR}")

@@ -109,17 +120,16 @@ include_directories(${PROJECT_SOURCE_DIR}
${LLVM_INC}
)

-if (LIBMEM_BUILD_TESTS)
+if (0)
set(TESTS_DIR "${PROJECT_SOURCE_DIR}/tests")
add_subdirectory(${TESTS_DIR})
endif()

-set_target_properties(libmem PROPERTIES POSITION_INDEPENDENT_CODE True INCLUDES ${LIBMEM_INC})
+set_target_properties(libmem PROPERTIES POSITION_INDEPENDENT_CODE True PUBLIC_HEADER "${LIBMEM_PUBLIC_HEADERS}")
+target_compile_features(libmem PUBLIC cxx_std_17)
+target_compile_definitions(libmem PUBLIC LM_EXPORT)
+target_include_directories(libmem PRIVATE "${LLVM_DEM_DIR}/include" "${LIBMEM_DIR}/src" "${INTERNAL_DIR}" "${COMMON_DIR}" "${LIBMEM_INC}" INTERFACE $<INSTALL_INTERFACE:include>)
target_compile_definitions(libmem PUBLIC LM_EXPORT)
-add_dependencies(libmem
- capstone-engine
- keystone-engine
-)

if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
set(LIBMEM_DEPS
@@ -151,8 +161,8 @@ else()
message(FATAL_ERROR "[!] Unsupported platform")
endif()

-target_link_libraries(libmem ${LIBMEM_DEPS})
-if(LIBMEM_BUILD_STATIC)
+target_link_libraries(libmem PRIVATE ${LIBMEM_DEPS} ${keystone_LINK_LIBRARIES} capstone::capstone)
+if(0)
# Create a bundled static library containing all dependencies (to mimic the shared library behavior)
set_target_properties(libmem PROPERTIES OUTPUT_NAME "libmem_partial")
set(libmem_bundle_files "$<TARGET_FILE:libmem>")
@@ -193,7 +203,7 @@ if(LIBMEM_BUILD_STATIC)
endif()
endif()

-if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
+if(0)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
cmake_path(SET CMAKE_INSTALL_PREFIX "$ENV{ProgramFiles}")
else()
@@ -202,14 +212,44 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN
endif()
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/libmem")
execute_process(COMMAND mkdir "${CMAKE_INSTALL_PREFIX}")
-else()
+elseif(0)
set(CMAKE_INSTALL_PREFIX "/usr")
endif()
-
install(TARGETS libmem
- LIBRARY DESTINATION lib)
+ EXPORT ${targets_export_name}
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ PUBLIC_HEADER DESTINATION include/libmem
+ RUNTIME DESTINATION bin
+)

-install(TARGETS libmem
- RUNTIME DESTINATION lib)
+# Install the export file, which allows users to find the target
+install(
+ EXPORT ${targets_export_name}
+ NAMESPACE libmem::
+ FILE ${targets_export_name}.cmake
+ DESTINATION share/libmem
+)

-install(DIRECTORY ${LIBMEM_INC}/libmem DESTINATION include)
+# Config and version files for the package
+include(CMakePackageConfigHelpers)
+
+configure_package_config_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/libmem-config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libmem-config.cmake
+ INSTALL_DESTINATION share/libmem
+)
+
+write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/libmem-config-version.cmake"
+ VERSION 5.0.2
+ COMPATIBILITY SameMajorVersion
+)
+
+# Install the config and version files
+install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libmem-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/libmem-config-version.cmake
+ DESTINATION share/libmem
+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 534057a..049805a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.22.1)

-include(ExternalProject)
+set(CMAKE_CXX_STANDARD 17)

project(libmem
LANGUAGES
@@ -49,6 +49,7 @@ message(STATUS
message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

+if(0)
# External dependencies
set(EXTERNAL_DEPENDENCIES_DIR "${PROJECT_SOURCE_DIR}/external")
set(CAPSTONE_DIR "${EXTERNAL_DEPENDENCIES_DIR}/capstone")
@@ -67,6 +68,7 @@ add_library(keystone STATIC IMPORTED)
set_target_properties(keystone PROPERTIES IMPORTED_LOCATION ${KEYSTONE_IMPORT_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}keystone${CMAKE_STATIC_LIBRARY_SUFFIX})
# End of external dependencies

+endif()
set(LIBMEM_DIR "${PROJECT_SOURCE_DIR}")
set(LIBMEM_INC "${LIBMEM_DIR}/include")
set(INTERNAL_DIR "${LIBMEM_DIR}/internal")
@@ -89,24 +91,21 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
endif()
file(GLOB LIBMEM_SRC ${LIBMEM_ARCH_SRC} "${LIBMEM_DIR}/src/freebsd/*.c" "${LIBMEM_DIR}/src/freebsd/ptrace/*.c" "${LIBMEM_DIR}/src/common/*.c" "${LIBMEM_DIR}/src/common/*.cpp" "${INTERNAL_DIR}/posixutils/*.c" "${INTERNAL_DIR}/elfutils/*.c" "${INTERNAL_DIR}/demangler/*.cpp")
endif()
+find_package(PkgConfig)
+pkg_check_modules(keystone REQUIRED keystone)
+find_package(capstone CONFIG REQUIRED)
set(LIBMEM_DEPS
- capstone
- keystone
- llvm
+ capstone::capstone
+ "${keystone_LINK_LIBRARIES}"
)
-
-if (LIBMEM_BUILD_STATIC)
- add_library(libmem STATIC ${LIBMEM_SRC})
-else()
- add_library(libmem SHARED ${LIBMEM_SRC})
-endif()
+file(GLOB_RECURSE LLVM_DEM_SRC "${LIBMEM_DIR}/external/llvm/lib/*.cpp")
+add_library(libmem ${LIBMEM_SRC} ${LLVM_DEM_SRC})
target_include_directories(libmem PRIVATE "${LIBMEM_DIR}/src" "${INTERNAL_DIR}" "${COMMON_DIR}")

include_directories(${PROJECT_SOURCE_DIR}
${LIBMEM_INC}
- ${CAPSTONE_INC}
- ${KEYSTONE_INC}
- ${LLVM_INC}
+ "${keystone_INCLUDE_DIRS}"
+ "${LIBMEM_DIR}/external/llvm/include"
)

if (LIBMEM_BUILD_TESTS)
@@ -116,10 +115,6 @@ endif()

set_target_properties(libmem PROPERTIES POSITION_INDEPENDENT_CODE True INCLUDES ${LIBMEM_INC})
target_compile_definitions(libmem PUBLIC LM_EXPORT)
-add_dependencies(libmem
- capstone-engine
- keystone-engine
-)

if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
set(LIBMEM_DEPS
@@ -152,7 +147,7 @@ else()
endif()

target_link_libraries(libmem ${LIBMEM_DEPS})
-if(LIBMEM_BUILD_STATIC)
+if(0)
# Create a bundled static library containing all dependencies (to mimic the shared library behavior)
set_target_properties(libmem PROPERTIES OUTPUT_NAME "libmem_partial")
set(libmem_bundle_files "$<TARGET_FILE:libmem>")
@@ -193,7 +188,7 @@ if(LIBMEM_BUILD_STATIC)
endif()
endif()

-if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
+if(0)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN)
cmake_path(SET CMAKE_INSTALL_PREFIX "$ENV{ProgramFiles}")
else()
@@ -202,14 +197,17 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL Windows OR ${CMAKE_SYSTEM_NAME} STREQUAL CYGWIN
endif()
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/libmem")
execute_process(COMMAND mkdir "${CMAKE_INSTALL_PREFIX}")
-else()
set(CMAKE_INSTALL_PREFIX "/usr")
endif()

-install(TARGETS libmem
- LIBRARY DESTINATION lib)
-
-install(TARGETS libmem
- RUNTIME DESTINATION lib)
-
install(DIRECTORY ${LIBMEM_INC}/libmem DESTINATION include)
+install(TARGETS libmem EXPORT libmem-target
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+)
+install(EXPORT libmem-target NAMESPACE libmem:: DESTINATION "share/libmem")
+include(CMakePackageConfigHelpers)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libmem-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/libmem-config.cmake" @ONLY)
+write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/libmem-config-version.cmake" VERSION 5.0.4 COMPATIBILITY SameMajorVersion)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmem-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/libmem-config-version.cmake" DESTINATION "share/libmem")
2 changes: 0 additions & 2 deletions ports/libmem/libmem-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(capstone CONFIG)

include("${CMAKE_CURRENT_LIST_DIR}/libmem-target.cmake")
check_required_components(libmem)
30 changes: 4 additions & 26 deletions ports/libmem/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,44 +1,22 @@
vcpkg_download_distfile(
EXPORT_SURFACE_PATCH
URLS https://github.com/rdbo/libmem/commit/04830fb5a6dd6c81843c1b54bd61dac5bd202b9a.patch?full_index=1
FILENAME libmem-export-surface-04830fb5a6dd6c81843c1b54bd61dac5bd202b9a.patch
SHA512 9060f86514f866a24a61b6cd51ee524f169b23781969b5f47f6fa5d2144369e7648658848fb2e00e9f0aed72119c4ab20842ba5afe9b0a485eea15ff63934596
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO rdbo/libmem
REF ${VERSION}
SHA512 d7c5a1a42d65a00ed3aa8ba8f6974650801d3436ae90e072fea29d4dcb32a3963e2610c89a16b87d94a9613c8f2f0e8deb83b673a1771a9cd1eb716a56106a16
REF "${VERSION}"
SHA512 a3245fedb0447133a674dc39b3f9dc0bce86cb8ed775cb50bc3b58ee410632653cfc340d17c2ca0a914e51ade9b62f393e23feb5f3d0459b1a1a8ce690a0d025
HEAD_REF master
PATCHES
0001-CMakeLists.patch
"${EXPORT_SURFACE_PATCH}"
)

message(WARNING "Removing PreLoad.cmake")
file(REMOVE "${SOURCE_PATH}/PreLoad.cmake")

file(MAKE_DIRECTORY "${SOURCE_PATH}/cmake")

file(COPY "${CMAKE_CURRENT_LIST_DIR}/libmem-config.cmake.in"
DESTINATION "${SOURCE_PATH}"
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/libmem-config.cmake.in" DESTINATION "${SOURCE_PATH}")
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
4 changes: 0 additions & 4 deletions ports/libmem/usage

This file was deleted.

8 changes: 2 additions & 6 deletions ports/libmem/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "libmem",
"version": "5.0.2",
"version": "5.0.4",
"description": "Advanced Game Hacking Library for C, Modern C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External) (Assembler/Disassembler)",
"homepage": "https://github.com/rdbo/libmem",
"license": "AGPL-3.0-only",
"supports": "!uwp & !xbox & !osx & !arm & !android & !ios",
"supports": "(!xbox & windows) | ((linux | freebsd) & (x86 | x64))",
"dependencies": [
"capstone",
"keystone",
Expand All @@ -16,10 +16,6 @@
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-cmake-get-vars",
"host": true
},
{
"name": "vcpkg-pkgconfig-get-modules",
"host": true
Expand Down
4 changes: 4 additions & 0 deletions scripts/test_ports/vcpkg-ci-libmem/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
vcpkg_cmake_build()
5 changes: 5 additions & 0 deletions scripts/test_ports/vcpkg-ci-libmem/project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project(libmem-test)
set(CMAKE_CXX_STANDARD 17)
find_package(libmem CONFIG REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main PRIVATE libmem::libmem)
7 changes: 7 additions & 0 deletions scripts/test_ports/vcpkg-ci-libmem/project/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <libmem/libmem.h>
int main()
{
lm_module_t moduled;
LM_FindModule("user32.dll", &moduled);
return 0;
}
Loading
Loading