early-access version 2853
This commit is contained in:
33
externals/vcpkg/ports/mman/mman-static.patch
vendored
Executable file
33
externals/vcpkg/ports/mman/mman-static.patch
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4696ad4..a72bbce 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -8,6 +8,10 @@ option (BUILD_TESTS "tests?" OFF)
|
||||
set (headers mman.h)
|
||||
set (sources mman.c)
|
||||
|
||||
+if(NOT BUILD_SHARED_LIBS)
|
||||
+ add_definitions(-DMMANSHARED_EXPORT=)
|
||||
+endif()
|
||||
+
|
||||
add_library (mman ${sources})
|
||||
|
||||
install (TARGETS mman RUNTIME DESTINATION bin
|
||||
diff --git a/mman.h b/mman.h
|
||||
index 4065bc6..435ea26 100644
|
||||
--- a/mman.h
|
||||
+++ b/mman.h
|
||||
@@ -15,11 +15,13 @@
|
||||
#include <_mingw.h>
|
||||
#endif
|
||||
|
||||
+#if !defined(MMANSHARED_EXPORT)
|
||||
#if defined(MMAN_LIBRARY)
|
||||
#define MMANSHARED_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define MMANSHARED_EXPORT __declspec(dllimport)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Determine offset type */
|
||||
#include <stdint.h>
|
||||
28
externals/vcpkg/ports/mman/portfile.cmake
vendored
Executable file
28
externals/vcpkg/ports/mman/portfile.cmake
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO witwall/mman-win32
|
||||
REF f5ff813c53935c3078f48e1f03a6944c4e7b459c
|
||||
SHA512 49c9a63a0a3c6fa585a76e65425f6fb1fdaa23cc87e53d5afb7a1298bcd4956298c076ee78f24dd5df5f5a0c5f6244c6abb63b40818e4d2546185fa37a73bf0d
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
mman-static.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/mman)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/sys ${CURRENT_PACKAGES_DIR}/include/mman/sys)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman)
|
||||
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mman/sys/mman.h" "__declspec(dllimport)" "")
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
4
externals/vcpkg/ports/mman/usage
vendored
Executable file
4
externals/vcpkg/ports/mman/usage
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
The mman.h header deployed by mman is placed in mman/sys/mman.h to avoid accidental inclusion.
|
||||
|
||||
find_path(MMAN_DIR NAMES sys/mman.h PATH_SUFFIXES mman)
|
||||
target_include_directories(main PRIVATE ${MMAN_DIR})
|
||||
14
externals/vcpkg/ports/mman/vcpkg.json
vendored
Executable file
14
externals/vcpkg/ports/mman/vcpkg.json
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "mman",
|
||||
"version-string": "git-f5ff813",
|
||||
"port-version": 5,
|
||||
"description": "A light implementation of the mmap functions for MinGW.",
|
||||
"homepage": "https://github.com/witwall/mman-win32",
|
||||
"supports": "windows",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user