[pystring] init port

This commit is contained in:
atkawa7 2017-07-20 13:39:09 -07:00
parent 8649c66496
commit fb5b310db9
3 changed files with 48 additions and 0 deletions

View File

@ -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()

3
ports/pystring/CONTROL Normal file
View File

@ -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

View File

@ -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)