mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[msgpack11] Add new port (#9524)
* Added portfile and control * Added patch file to support MSVC * Added description for msgpack11 in CONTROL * added homepage to Control, code refactoring for portfile * refactored portfile * made align changes * Update portfile.cmake * Update CONTROL removed v from the version * added ref properly Co-authored-by: Mayank Kataruka <37381526+mayankkt9@users.noreply.github.com>
This commit is contained in:
parent
c97c23ce0a
commit
ba47af7fa8
6
ports/msgpack11/CONTROL
Normal file
6
ports/msgpack11/CONTROL
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Source: msgpack11
|
||||||
|
Version: 0.0.10
|
||||||
|
Homepage: https://msgpack.org
|
||||||
|
Build-Depends: gtest
|
||||||
|
Description: msgpack11 is a tiny MsgPack library for C++11, providing MsgPack parsing and serialization.This library is inspired by json11.The API of msgpack11 is designed to be similar with json11.
|
||||||
|
|
19
ports/msgpack11/msvc.patch
Normal file
19
ports/msgpack11/msvc.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 9424838..080cefa 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -6,9 +6,12 @@ option(MSGPACK11_BUILD_TESTS "Build unit tests" ON)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
-add_library(msgpack11 msgpack11.cpp)
|
||||||
|
+add_library(msgpack11 STATIC msgpack11.cpp)
|
||||||
|
target_include_directories(msgpack11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
-target_compile_options(msgpack11 PRIVATE -fno-rtti -Wall -Wextra -Werror)
|
||||||
|
+target_compile_options(msgpack11 PRIVATE -fno-rtti)
|
||||||
|
+if(NOT MSVC)
|
||||||
|
+ target_compile_options(msgpack11 PRIVATE -Wall -Wextra -Werror)
|
||||||
|
+endif()
|
||||||
|
configure_file("msgpack11.pc.in" "msgpack11.pc" @ONLY)
|
||||||
|
|
||||||
|
if (MSGPACK11_BUILD_TESTS)
|
25
ports/msgpack11/portfile.cmake
Normal file
25
ports/msgpack11/portfile.cmake
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO ar90n/msgpack11
|
||||||
|
REF v0.0.10
|
||||||
|
SHA512 7b90893f9cdec529789f6e75703f5945c6fc5c946b8708a7a2cb295faf4af111c8cc61265b636f385641031b85181929205be9c5d155f405909445dce85b4ce8
|
||||||
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
|
msvc.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_configure_cmake(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PREFER_NINJA
|
||||||
|
OPTIONS
|
||||||
|
-DMSGPACK11_BUILD_TESTS=OFF
|
||||||
|
-DMSGPACK11_BUILD_EXAMPLES=OFF
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
vcpkg_install_cmake()
|
||||||
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
Loading…
x
Reference in New Issue
Block a user