mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 21:28:59 +08:00
parent
ee08875bfb
commit
8497b3b4f8
21
ports/md4c/cmake.patch
Normal file
21
ports/md4c/cmake.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index aec8293..600d51b 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -51,16 +51,6 @@ elseif(MSVC)
|
||||||
|
# Disable warnings about the so-called unsecured functions:
|
||||||
|
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
add_compile_options(/W3)
|
||||||
|
-
|
||||||
|
- # Specify proper C runtime library:
|
||||||
|
- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
||||||
|
- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
|
||||||
|
- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||||
|
- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
|
||||||
|
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||||
|
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||||
|
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||||
|
- set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
23
ports/md4c/portfile.cmake
Normal file
23
ports/md4c/portfile.cmake
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO mity/md4c
|
||||||
|
REF "release-${VERSION}"
|
||||||
|
SHA512 30607ba39d6c59329f5a56a90cd816ff60b82ea752ac2b9df356d756529cfc49170019fae5df32fa94afc0e2a186c66eaf56fa6373d18436c06ace670675ba85
|
||||||
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
|
"cmake.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_cmake_configure(
|
||||||
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
|
OPTIONS -DBUILD_MD2HTML_EXECUTABLE=OFF
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_cmake_install()
|
||||||
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/md4c")
|
||||||
|
vcpkg_fixup_pkgconfig()
|
||||||
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
|
4
ports/md4c/usage
Normal file
4
ports/md4c/usage
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
md4c provides CMake targets:
|
||||||
|
|
||||||
|
find_package(md4c CONFIG REQUIRED)
|
||||||
|
target_link_libraries(main PRIVATE md4c::md4c)
|
17
ports/md4c/vcpkg.json
Normal file
17
ports/md4c/vcpkg.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "md4c",
|
||||||
|
"version": "0.5.2",
|
||||||
|
"description": "MD4C is a C library providing a Markdown parser.",
|
||||||
|
"homepage": "https://github.com/mity/md4c",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -5760,6 +5760,10 @@
|
|||||||
"baseline": "2.7.2.14",
|
"baseline": "2.7.2.14",
|
||||||
"port-version": 5
|
"port-version": 5
|
||||||
},
|
},
|
||||||
|
"md4c": {
|
||||||
|
"baseline": "0.5.2",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
"mdl-sdk": {
|
"mdl-sdk": {
|
||||||
"baseline": "2021.1.2",
|
"baseline": "2021.1.2",
|
||||||
"port-version": 5
|
"port-version": 5
|
||||||
|
9
versions/m-/md4c.json
Normal file
9
versions/m-/md4c.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "3d6a0dd2cd6d89e4c83bebf016a978b82c0733c5",
|
||||||
|
"version": "0.5.2",
|
||||||
|
"port-version": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user