aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXing Ji <33065325+jixingcn@users.noreply.github.com>2021-09-04 08:00:07 +0800
committerGitHub <noreply@github.com>2021-09-03 17:00:07 -0700
commit9414ca11a93e188d061986f6fe6eb84c94938ed0 (patch)
tree0490a332c0e1f8be078ee5f49af3e130fcb6e33c
parentaed3b48635aad5b0e13a45acfb58c232648e46dd (diff)
downloadvcpkg-9414ca11a93e188d061986f6fe6eb84c94938ed0.tar.gz
vcpkg-9414ca11a93e188d061986f6fe6eb84c94938ed0.zip
[pystring] rename `libpystring` to `pystring` (#19740)
* rename `libpystring` to `pystring` * run `vcpkg x-add-version --all` * [pystring] Simplify CMake * [pystring] Use target name as per opencolorio Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
-rw-r--r--ports/pystring/CMakeLists.txt26
-rw-r--r--ports/pystring/portfile.cmake7
-rw-r--r--ports/pystring/vcpkg.json14
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/p-/pystring.json5
5 files changed, 41 insertions, 13 deletions
diff --git a/ports/pystring/CMakeLists.txt b/ports/pystring/CMakeLists.txt
index ca410d6dc..48df84919 100644
--- a/ports/pystring/CMakeLists.txt
+++ b/ports/pystring/CMakeLists.txt
@@ -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
+)
diff --git a/ports/pystring/portfile.cmake b/ports/pystring/portfile.cmake
index 24a038aa5..31143c5c9 100644
--- a/ports/pystring/portfile.cmake
+++ b/ports/pystring/portfile.cmake
@@ -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)
diff --git a/ports/pystring/vcpkg.json b/ports/pystring/vcpkg.json
index f9b0dcaff..4011f52e7 100644
--- a/ports/pystring/vcpkg.json
+++ b/ports/pystring/vcpkg.json
@@ -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
+ }
+ ]
}
diff --git a/versions/baseline.json b/versions/baseline.json
index 552719363..0bdd97716 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5174,7 +5174,7 @@
},
"pystring": {
"baseline": "1.1.3",
- "port-version": 3
+ "port-version": 4
},
"python2": {
"baseline": "2.7.18",
diff --git a/versions/p-/pystring.json b/versions/p-/pystring.json
index d89279e5a..7fef6450f 100644
--- a/versions/p-/pystring.json
+++ b/versions/p-/pystring.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "ed5bf60bd6e1720457de5eaa39f01f5b3a414f01",
+ "version-semver": "1.1.3",
+ "port-version": 4
+ },
+ {
"git-tree": "f79bc19acdfb0e0d9445191d54f89234c27db843",
"version-semver": "1.1.3",
"port-version": 3