mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:58:59 +08:00
[pystring] init port
This commit is contained in:
parent
8649c66496
commit
fb5b310db9
23
ports/pystring/CMakeLists.txt
Normal file
23
ports/pystring/CMakeLists.txt
Normal 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
3
ports/pystring/CONTROL
Normal 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
|
22
ports/pystring/portfile.cmake
Normal file
22
ports/pystring/portfile.cmake
Normal 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)
|
Loading…
Reference in New Issue
Block a user