-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[cdt] Add new port #29324
Merged
Merged
[cdt] Add new port #29324
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO artem-ogre/CDT | ||
REF "${VERSION}" | ||
SHA512 811d1fede4960808954bc17f37c8639f52800c98562e9283517c666735ddf3b2f2f8a57992669899be13c40b0fc4439d3cd1a101cb596d2335ef4fc307408c63 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
"64-bit-index-type" CDT_USE_64_BIT_INDEX_TYPE | ||
"as-compiled-library" CDT_USE_AS_COMPILED_LIBRARY | ||
"boost" CDT_USE_BOOST | ||
) | ||
|
||
if (NOT CDT_USE_AS_COMPILED_LIBRARY) | ||
set(VCPKG_BUILD_TYPE "release") # header-only | ||
endif() | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}/CDT" | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_cmake_config_fixup(CONFIG_PATH cmake) | ||
|
||
if(CDT_USE_BOOST) | ||
set(CDT_USE_BOOST_STR "#if 1") | ||
else() | ||
set(CDT_USE_BOOST_STR "#if 0") | ||
endif() | ||
foreach(FILE CDTUtils.h Triangulation.hpp) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${FILE}" "#ifdef CDT_USE_BOOST" "${CDT_USE_BOOST_STR}") | ||
endforeach() | ||
|
||
if (CDT_USE_AS_COMPILED_LIBRARY) | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
endif() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "cdt", | ||
"version": "1.2.0", | ||
"description": "Constrained Delaunay Triangulation", | ||
"homepage": "https://github.com/artem-ogre/CDT.git", | ||
"license": "MPL-2.0", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
], | ||
"features": { | ||
"64-bit-index-type": { | ||
"description": "64bits are used to store vertex/triangle index types" | ||
}, | ||
"as-compiled-library": { | ||
"description": "Templates for float and double will be instantiated and compiled into a library" | ||
}, | ||
"boost": { | ||
"description": "Boost is used as a fall-back for features missing in C++98 and performance tweaks", | ||
"dependencies": [ | ||
"boost-container" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "002b5841cd0600e2104188e9c6d2f27b74caab1a", | ||
"version": "1.2.0", | ||
"port-version": 0 | ||
} | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This looks like an alternative but it doesn't appear to leak into any ABI sensitive bits, so it's probably OK. However, the value does need to be "baked" into the resulting headers. See https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#a-feature-may-replace-polyfills-with-aliases-provided-that-replacement-is-baked-into-the-installed-tree
I think you can do this with something like:
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.
Done