[rply] Add support for non-prefixed includes (#37759)

The custom CMakeLists.txt in the port installs headers under `rply/` and
expects `#include <rply/rply.h>` correspondingly as the include.
However, the code samples in the RPly project use a plain `#include
"rply.h"` instead: https://w3.impa.br/~diego/software/rply/

This PR adds `include/rply/` to the `target_include_directories()` to
support both conventions.

The project exports only two distinctly-named headers (`rply.h` and
`rplyfile.h`) so the non-prefixed includes causing a collision somewhere
is unlikely.

Also added license info to vcpkg.json and a usage file.
This commit is contained in:
Martin Valgur 2024-03-29 02:37:07 +02:00 committed by GitHub
parent 3eb124fb41
commit 31b524616c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 15 additions and 14 deletions

View File

@ -20,6 +20,7 @@ add_library (${target_name} ${target_srcs} ${target_headers} ${sources_msvc})
target_include_directories (${target_name} target_include_directories (${target_name}
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${target_name}>
) )
set_target_properties(${target_name} PROPERTIES set_target_properties(${target_name} PROPERTIES

View File

@ -27,6 +27,5 @@ vcpkg_cmake_install()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup() vcpkg_cmake_config_fixup()
# Handle copyright file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

4
ports/rply/usage Normal file
View File

@ -0,0 +1,4 @@
The rply port provides an unofficial CMake target:
find_package(rply REQUIRED)
target_link_libraries(main PRIVATE rply::rply)

View File

@ -1,9 +1,10 @@
{ {
"name": "rply", "name": "rply",
"version": "1.1.4", "version": "1.1.4",
"port-version": 3, "port-version": 4,
"description": "ANSI C Library for PLY file format input and output", "description": "ANSI C Library for PLY file format input and output",
"homepage": "http://w3.impa.br/~diego/software/rply", "homepage": "http://w3.impa.br/~diego/software/rply",
"license": "MIT",
"dependencies": [ "dependencies": [
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",

View File

@ -1009,15 +1009,6 @@ rest-rpc:arm64-osx=skip
rpclib:arm64-windows=fail rpclib:arm64-windows=fail
rpclib:arm64-uwp=fail rpclib:arm64-uwp=fail
rpclib:x64-uwp=fail rpclib:x64-uwp=fail
#The website of rply http://w3.impa.br/~diego/software/rply cannot be accessed
rply:x86-windows=skip
rply:x64-windows=skip
rply:x64-windows-static=skip
rply:x64-uwp=skip
rply:arm64-windows=skip
rply:x64-linux=skip
rply:x64-osx=skip
rply:x64-windows-static-md=skip
salome-medcoupling:x64-linux=fail salome-medcoupling:x64-linux=fail
scintilla:arm-neon-android=fail scintilla:arm-neon-android=fail
scintilla:arm64-android=fail scintilla:arm64-android=fail

View File

@ -7718,7 +7718,7 @@
}, },
"rply": { "rply": {
"baseline": "1.1.4", "baseline": "1.1.4",
"port-version": 3 "port-version": 4
}, },
"rsasynccpp": { "rsasynccpp": {
"baseline": "0.0.7", "baseline": "0.0.7",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "7adc1bc3b350c2a61baf3d54bf4cdfdc02e11392",
"version": "1.1.4",
"port-version": 4
},
{ {
"git-tree": "824058a46ec01bf8d290a56e3b42f1b01ef4ce68", "git-tree": "824058a46ec01bf8d290a56e3b42f1b01ef4ce68",
"version": "1.1.4", "version": "1.1.4",