diff options
Diffstat (limited to 'ports/pystring')
| -rw-r--r-- | ports/pystring/CMakeLists.txt | 26 | ||||
| -rw-r--r-- | ports/pystring/portfile.cmake | 7 | ||||
| -rw-r--r-- | ports/pystring/vcpkg.json | 14 |
3 files changed, 35 insertions, 12 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 + } + ] } |
