aboutsummaryrefslogtreecommitdiff
path: root/ports/pystring
diff options
context:
space:
mode:
Diffstat (limited to 'ports/pystring')
-rw-r--r--ports/pystring/CMakeLists.txt23
-rw-r--r--ports/pystring/CONTROL3
-rw-r--r--ports/pystring/portfile.cmake22
3 files changed, 48 insertions, 0 deletions
diff --git a/ports/pystring/CMakeLists.txt b/ports/pystring/CMakeLists.txt
new file mode 100644
index 000000000..6fccf78d9
--- /dev/null
+++ b/ports/pystring/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.5.1)
+project(libpystring C CXX)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+add_library(libpystring pystring.cpp)
+
+install(
+ TARGETS libpystring
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES pystring.h DESTINATION include)
+endif()
diff --git a/ports/pystring/CONTROL b/ports/pystring/CONTROL
new file mode 100644
index 000000000..23980ef12
--- /dev/null
+++ b/ports/pystring/CONTROL
@@ -0,0 +1,3 @@
+Source: pystring
+Version: 1.1.3
+Description: Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string
diff --git a/ports/pystring/portfile.cmake b/ports/pystring/portfile.cmake
new file mode 100644
index 000000000..d6e9700f8
--- /dev/null
+++ b/ports/pystring/portfile.cmake
@@ -0,0 +1,22 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO imageworks/pystring
+ REF v1.1.3
+ SHA512 a46bb2e96d6eb351a4a8097cde46ac2877d28e88f9e57e0ac36c42e8fc8543517c4be70306a01e2f88a891fc53c612494aeb37f47a200d94b8e1b050ed16eff6
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pystring RENAME copyright)