-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[c4core] Add new port #10791
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
Merged
Merged
[c4core] Add new port #10791
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
685ecb3
[c4core] Add new port
vvandrounik 82f3286
Remove deprecated include
vvandrounik dab88ea
Fix ver regarding maintainer guide
vvandrounik 910ea9f
Mark port as unsupport arm/arm64
vvandrounik cf0b40f
Update CI baseline
vvandrounik edf9f20
Mark port as unsupport OSX
vvandrounik a427a08
Update CI baseline
vvandrounik 69c8280
Fix path to header instead of moving
vvandrounik 83fb574
Replace deprecated func vcpkg_extract_source_archive, add PREFER_NINJ…
vvandrounik 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 hidden or 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,5 @@ | ||
Source: c4core | ||
Version: 2020-04-12 | ||
Homepage: https://github.com/biojppm/c4core | ||
Description: Library of low-level C++ utilities | ||
Supports: !(arm|arm64|osx) |
This file contains hidden or 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,78 @@ | ||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
|
||
vcpkg_fail_port_install( | ||
ON_ARCH "arm" "arm64" | ||
ON_TARGET "OSX" | ||
) | ||
|
||
# Get c4core src | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO biojppm/c4core | ||
REF bc4de0291bb96ae509ee99a54f139563cf14638e | ||
SHA512 2c0c4511cb43f34492b6d0d8dfef90623dfacb6ae43f6a6173fbf9efa63f7a018235ec9dcd9a211a3cd393c2114adb39a4276df94e2d23f9c354d644a36e51a0 | ||
HEAD_REF master | ||
) | ||
|
||
set(COMMIT_HASH a0f0c17bfc9a9a91cc72891539b513c129c6d122) | ||
|
||
# Get cmake scripts for c4core & rapidyaml | ||
vcpkg_download_distfile(CMAKE_ARCHIVE | ||
JackBoosY marked this conversation as resolved.
Show resolved
Hide resolved
|
||
URLS "https://github.com/biojppm/cmake/archive/${COMMIT_HASH}.zip" | ||
FILENAME "cmake-${COMMIT_HASH}.zip" | ||
SHA512 4fbc711f3120501fa40733c3b66e34cd6a7e1b598b1378fbb59d1a87c88290a03d021f5176634089da41682fd918d7e27c6c146052dec54d7e956be15f12744f | ||
) | ||
|
||
vcpkg_extract_source_archive( | ||
JackBoosY marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
${CMAKE_ARCHIVE} | ||
"${CURRENT_BUILDTREES_DIR}/src/deps" | ||
) | ||
|
||
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake") | ||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/deps/cmake-${COMMIT_HASH}" DESTINATION ${SOURCE_PATH}) | ||
file(RENAME "${SOURCE_PATH}/cmake-${COMMIT_HASH}" "${SOURCE_PATH}/cmake") | ||
|
||
set(COMMIT_HASH 78e525c6e74df6d62d782864a52c0d279dcee24f) | ||
|
||
vcpkg_download_distfile(DEBUGBREAK_ARCHIVE | ||
JackBoosY marked this conversation as resolved.
Show resolved
Hide resolved
|
||
URLS "https://github.com/biojppm/debugbreak/archive/${COMMIT_HASH}.zip" | ||
FILENAME "debugbreak-${COMMIT_HASH}.zip" | ||
SHA512 25f3d45b09ce362f736fac0f6d6a6c7f2053fec4975b32b0565288893e4658fd0648a7988c3a5fe0e373e92705d7a3970eaa7cfc053f375ffb75e80772d0df64 | ||
) | ||
|
||
vcpkg_extract_source_archive( | ||
JackBoosY marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
${DEBUGBREAK_ARCHIVE} | ||
"${CURRENT_BUILDTREES_DIR}/src/deps" | ||
) | ||
|
||
file(REMOVE_RECURSE "${SOURCE_PATH}/ext/debugbreak") | ||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/deps/debugbreak-${COMMIT_HASH}" DESTINATION "${SOURCE_PATH}/ext") | ||
file(RENAME "${SOURCE_PATH}/ext/debugbreak-${COMMIT_HASH}" "${SOURCE_PATH}/ext/debugbreak") | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
JackBoosY marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) | ||
|
||
vcpkg_install_cmake() | ||
|
||
vcpkg_copy_pdbs() | ||
|
||
if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) | ||
elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/c4core) | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/c4core) | ||
endif() | ||
|
||
# Fix paths in config file | ||
file(READ "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" _contents) | ||
string(REGEX REPLACE [[[ \t\r\n]*"\${PACKAGE_PREFIX_DIR}[\./\\]*"]] [["${PACKAGE_PREFIX_DIR}/../.."]] _contents "${_contents}") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" "${_contents}") | ||
|
||
# Fix path to header | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/c4/error.hpp" "<debugbreak/debugbreak.h>" "\"extern/debugbreak/debugbreak.h\"") | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
|
||
file(INSTALL | ||
"${SOURCE_PATH}/LICENSE.txt" | ||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/c4core" RENAME copyright) |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.