diff options
Diffstat (limited to 'vcpkg/ports/pystring')
| -rw-r--r-- | vcpkg/ports/pystring/CMakeLists.txt | 31 | ||||
| -rw-r--r-- | vcpkg/ports/pystring/portfile.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/pystring/vcpkg.json | 17 |
3 files changed, 72 insertions, 0 deletions
diff --git a/vcpkg/ports/pystring/CMakeLists.txt b/vcpkg/ports/pystring/CMakeLists.txt new file mode 100644 index 0000000..48df849 --- /dev/null +++ b/vcpkg/ports/pystring/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.12) +project(pystring CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +add_library(pystring pystring.cpp) +target_include_directories( + pystring + PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> + $<INSTALL_INTERFACE:include> +) + +include(GNUInstallDirs) + +install( + TARGETS pystring + EXPORT pystring-config +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES pystring.h DESTINATION include/pystring) +endif() + +install( + EXPORT pystring-config + NAMESPACE pystring:: + DESTINATION share/pystring +) diff --git a/vcpkg/ports/pystring/portfile.cmake b/vcpkg/ports/pystring/portfile.cmake new file mode 100644 index 0000000..5059da1 --- /dev/null +++ b/vcpkg/ports/pystring/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imageworks/pystring + REF v${VERSION} + SHA512 9c0460fea67885492f9b0d29a9ba312d960fd5e43577cdcfd47faf04397ff4b7e456ed68f1948b923d2f63f9922d576b93e4ca1a27376bcb6d29c683828acb01 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() +vcpkg_copy_pdbs() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/pystring/vcpkg.json b/vcpkg/ports/pystring/vcpkg.json new file mode 100644 index 0000000..4c197cd --- /dev/null +++ b/vcpkg/ports/pystring/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "pystring", + "version": "1.1.4", + "description": "Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string", + "homepage": "https://github.com/imageworks/pystring", + "license": "BSD-3-Clause", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |