diff --git a/ports/pystring/CMakeLists.txt b/ports/pystring/CMakeLists.txt index ca410d6dc3eccc..48df849192b0fa 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 + $ + $ +) + +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 24a038aa5e0d2b..31143c5c9cab97 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 f9b0dcaff44346..4011f52e790ce6 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 a4cd4e99dae634..0b063279119646 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5134,7 +5134,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 d89279e5ad2031..7fef6450f65e29 100644 --- a/versions/p-/pystring.json +++ b/versions/p-/pystring.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ed5bf60bd6e1720457de5eaa39f01f5b3a414f01", + "version-semver": "1.1.3", + "port-version": 4 + }, { "git-tree": "f79bc19acdfb0e0d9445191d54f89234c27db843", "version-semver": "1.1.3",