aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/cserialport
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/cserialport')
-rw-r--r--vcpkg/ports/cserialport/portfile.cmake28
-rw-r--r--vcpkg/ports/cserialport/vcpkg.json18
2 files changed, 46 insertions, 0 deletions
diff --git a/vcpkg/ports/cserialport/portfile.cmake b/vcpkg/ports/cserialport/portfile.cmake
new file mode 100644
index 0000000..ab3bcc4
--- /dev/null
+++ b/vcpkg/ports/cserialport/portfile.cmake
@@ -0,0 +1,28 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO itas109/CSerialPort
+ REF "v${VERSION}"
+ SHA512 657d0696df97d71d8b44f5e254e72ca1c36d701e84284d78e8bb6d4f5b525920e192477009cc79137984563dbd9d30ae530407dbcd121a5171326e0012a1a3f5
+ HEAD_REF master
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DCSERIALPORT_BUILD_EXAMPLES=OFF
+ -DCSERIALPORT_BUILD_TEST=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CSerialPort)
+vcpkg_fixup_pkgconfig()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/cserialport/vcpkg.json b/vcpkg/ports/cserialport/vcpkg.json
new file mode 100644
index 0000000..d212c3b
--- /dev/null
+++ b/vcpkg/ports/cserialport/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "cserialport",
+ "version": "4.3.3",
+ "description": "C++ lightweight cross-platform serial port library and protocol parsing, also support C, C#, Java, Python, Node.js, Electron, Rust etc.",
+ "homepage": "https://github.com/itas109/CSerialPort",
+ "license": "LGPL-3.0-only WITH LGPL-3.0-linking-exception",
+ "supports": "!uwp & !xbox",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}