aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/fastcdr
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/fastcdr')
-rw-r--r--vcpkg/ports/fastcdr/pdb-file.patch13
-rw-r--r--vcpkg/ports/fastcdr/portfile.cmake28
-rw-r--r--vcpkg/ports/fastcdr/vcpkg.json17
3 files changed, 58 insertions, 0 deletions
diff --git a/vcpkg/ports/fastcdr/pdb-file.patch b/vcpkg/ports/fastcdr/pdb-file.patch
new file mode 100644
index 0000000..03306a1
--- /dev/null
+++ b/vcpkg/ports/fastcdr/pdb-file.patch
@@ -0,0 +1,13 @@
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index 7ac643b..a70750d 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -158,7 +158,7 @@ if(MSVC OR MSVC_IDE)
+ endif()
+
+ # install symbols if any
+- if(PDB_FILE)
++ if(PDB_FILE AND BUILD_SHARED_LIBS)
+ install(FILES ${PDB_FILE}
+ DESTINATION ${LIB_INSTALL_DIR}
+ COMPONENT symbols
diff --git a/vcpkg/ports/fastcdr/portfile.cmake b/vcpkg/ports/fastcdr/portfile.cmake
new file mode 100644
index 0000000..3fac98f
--- /dev/null
+++ b/vcpkg/ports/fastcdr/portfile.cmake
@@ -0,0 +1,28 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO eProsima/Fast-CDR
+ REF "v${VERSION}"
+ SHA512 49ffa82bca0db4968ba2baecbf46c020ac1b072226486678cfe26ab7c023ab6cbcb1b48c48d9ac2e7254ef6ce0c61f717c3cbbc5f546a13d8dff299ce382580c
+ HEAD_REF master
+ PATCHES
+ pdb-file.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH ${SOURCE_PATH})
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fastcdr)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/fastcdr ${CURRENT_PACKAGES_DIR}/debug/lib/fastcdr)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h" "(defined(_DLL) || defined(_RTLDLL)) && defined(EPROSIMA_DYN_LINK)" "1")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fastcdr/fastcdr_dll.h" "defined(FASTCDR_DYN_LINK)" "1")
+endif()
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/fastcdr/vcpkg.json b/vcpkg/ports/fastcdr/vcpkg.json
new file mode 100644
index 0000000..ea95ef4
--- /dev/null
+++ b/vcpkg/ports/fastcdr/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "fastcdr",
+ "version-semver": "2.3.4",
+ "description": "eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard.",
+ "homepage": "https://github.com/eProsima/Fast-CDR",
+ "license": "Apache-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}