-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[libinterpolate] Add new port #44608
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
Changes from 13 commits
76e5ffa
9b7ef27
309884b
167f94f
1fc70ce
5dd294e
a5e97cb
7a1316c
1ff724c
28f376a
e99774e
15a8049
fa97584
df84ba6
6c48c74
f8bb56e
dc7bfc5
989983b
1245d53
154c5f0
4970c05
35998b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| index 3aea49a..b21d330 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -17,9 +17,18 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} | ||
| set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
|
||
| if("${libInterpolate_VERSION}" STREQUAL "UNKNOWN") | ||
| - message(STATUS "Detecting version number using git...") | ||
| - include(macro-git_version) | ||
| - git_version(libInterpolate) | ||
| + find_package(Git QUIET) | ||
| + if(Git_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") | ||
| + message(STATUS "Detecting version number using git...") | ||
| + include(macro-git_version) | ||
| + git_version(libInterpolate) | ||
| + else() | ||
| + message(STATUS "Git not found or not a git repository. Setting default version.") | ||
| + set(libInterpolate_VERSION "0.0.0" CACHE STRING "Library version number" FORCE) | ||
| + set(libInterpolate_VERSION_MAJOR "0" CACHE INTERNAL "Library major version number") | ||
| + set(libInterpolate_VERSION_MINOR "0" CACHE INTERNAL "Library minor version number") | ||
| + set(libInterpolate_VERSION_PATCH "0" CACHE INTERNAL "Library patch version number") | ||
| + endif() | ||
| message(STATUS "Version: ${libInterpolate_VERSION}") | ||
| message(STATUS "Version (Full): ${libInterpolate_VERSION_FULL}") | ||
| endif() | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,29 @@ | ||||||||||||||
| vcpkg_from_github( | ||||||||||||||
| OUT_SOURCE_PATH SOURCE_PATH | ||||||||||||||
| REPO CD3/libInterpolate | ||||||||||||||
| REF ${VERSION} | ||||||||||||||
| SHA512 6d53e1fb3af3067ddd13e491563e8da5af9756efba5a2def486f014c23969633ca73cf43dd2f93047716ebb6565f5e9911b6ab85abef2db3b9faefc26ab3aa59 | ||||||||||||||
| HEAD_REF master | ||||||||||||||
| PATCHES | ||||||||||||||
| fix-version-detection.patch | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| set(VCPKG_BUILD_TYPE release) # header-only port | ||||||||||||||
|
|
||||||||||||||
| vcpkg_cmake_configure( | ||||||||||||||
| SOURCE_PATH "${SOURCE_PATH}" | ||||||||||||||
| OPTIONS | ||||||||||||||
| -DBUILD_TESTS=OFF | ||||||||||||||
| -DlibInterpolate_VERSION=${VERSION} | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| vcpkg_cmake_install() | ||||||||||||||
| vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libInterpolate) | ||||||||||||||
| vcpkg_fixup_pkgconfig() | ||||||||||||||
|
|
||||||||||||||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This doesn't exist with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||||||||||||||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") | ||||||||||||||
|
|
||||||||||||||
| file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) | ||||||||||||||
|
|
||||||||||||||
| configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you, good suggestion. added |
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,4 @@ | ||||||||||||||||||
| The package libInterpolate is header only and can be used from CMake via: | ||||||||||||||||||
|
|
||||||||||||||||||
| find_package(libInterpolate CONFIG REQUIRED) | ||||||||||||||||||
| target_link_libraries(main PRIVATE libInterpolate::Interpolate) | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This probably mostly identical to the heuristical output?
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "name": "libinterpolate", | ||
| "version": "2.7.1", | ||
| "description": "Header-only C++ interpolation library.", | ||
| "homepage": "https://github.com/CD3/libInterpolate", | ||
| "license": "MIT", | ||
| "dependencies": [ | ||
| "boost-geometry", | ||
| "boost-headers", | ||
| "boost-lexical-cast", | ||
| "boost-mpl", | ||
| "boost-program-options", | ||
| "boost-range", | ||
| "boost-tokenizer", | ||
| "boost-type-erasure", | ||
| "boost-type-traits", | ||
| { | ||
| "name": "eigen3", | ||
| "host": true, | ||
| "version>=": "3.4.0" | ||
| }, | ||
|
Niproblema marked this conversation as resolved.
Outdated
|
||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "versions": [ | ||
| { | ||
| "git-tree": "ae153a19d43433e9dccd2f8cc7d8f925e5e9d4ba", | ||
| "version": "2.7.1", | ||
| "port-version": 0 | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICS this patch isn't needed: When
libInterpolate_VERSIONis passed as an input variable, the section is never entered.And
libInterpolate_VERSION_FULLisn't used anyways.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that a fallback might be useful. Anyway, removed