diff options
| author | Sana Jahan <sanadgrt@gmail.com> | 2020-01-22 13:07:27 -0800 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2020-01-22 13:07:27 -0800 |
| commit | ba47af7fa8cc1ed353271d35c9752197ec7c7966 (patch) | |
| tree | 28e6113119f2d317f370a088ed1cff2b27adbd1e | |
| parent | c97c23ce0a60e20c735d58752b078a343c20970b (diff) | |
| download | vcpkg-ba47af7fa8cc1ed353271d35c9752197ec7c7966.tar.gz vcpkg-ba47af7fa8cc1ed353271d35c9752197ec7c7966.zip | |
[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>
| -rw-r--r-- | ports/msgpack11/CONTROL | 6 | ||||
| -rw-r--r-- | ports/msgpack11/msvc.patch | 19 | ||||
| -rw-r--r-- | ports/msgpack11/portfile.cmake | 25 |
3 files changed, 50 insertions, 0 deletions
diff --git a/ports/msgpack11/CONTROL b/ports/msgpack11/CONTROL new file mode 100644 index 000000000..8312187bb --- /dev/null +++ b/ports/msgpack11/CONTROL @@ -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.
+
diff --git a/ports/msgpack11/msvc.patch b/ports/msgpack11/msvc.patch new file mode 100644 index 000000000..b7e02937a --- /dev/null +++ b/ports/msgpack11/msvc.patch @@ -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) diff --git a/ports/msgpack11/portfile.cmake b/ports/msgpack11/portfile.cmake new file mode 100644 index 000000000..6bd662ae5 --- /dev/null +++ b/ports/msgpack11/portfile.cmake @@ -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)
|
