Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pystring] rename libpystring to pystring #19740

Merged
merged 4 commits into from
Sep 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions ports/pystring/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
cmake_minimum_required(VERSION 3.5.1)
project(libpystring C CXX)
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(libpystring pystring.cpp)
add_library(pystring pystring.cpp)
target_include_directories(
pystring
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)

include(GNUInstallDirs)

install(
TARGETS libpystring
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
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
)
7 changes: 4 additions & 3 deletions ports/pystring/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ vcpkg_from_github(

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pystring RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
14 changes: 12 additions & 2 deletions ports/pystring/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"name": "pystring",
"version-semver": "1.1.3",
"port-version": 3,
"port-version": 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"
"homepage": "https://github.com/imageworks/pystring",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5134,7 +5134,7 @@
},
"pystring": {
"baseline": "1.1.3",
"port-version": 3
"port-version": 4
},
"python2": {
"baseline": "2.7.18",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pystring.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ed5bf60bd6e1720457de5eaa39f01f5b3a414f01",
"version-semver": "1.1.3",
"port-version": 4
},
{
"git-tree": "f79bc19acdfb0e0d9445191d54f89234c27db843",
"version-semver": "1.1.3",
Expand Down