-
Notifications
You must be signed in to change notification settings - Fork 7.2k
[cconfig] adding cconfig lib to VCPKG #47480
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
Conversation
|
@Nouridin thank you for the contribution. I'm placing this PR in draft while the build errors get resolved. Additionally, I recommend taking a look at our tutorial for packaging libraries for vcpkg -> https://learn.microsoft.com/vcpkg/get_started/get-started-packaging?pivots=shell-bash I noticed you are adding a test port. Please use https://github.com/microsoft/vcpkg/tree/master/scripts/test_ports/vcpkg-ci-plplot for reference on how to add a test port for vcpkg. Thanks again! |
|
your Windows-x86 tests have consumed my mental capacity |
JavierMatosD
left a comment
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.
Please move the test project to a vcpkg-ci-cconfig port and here is an example of a header only port in the registry
vcpkg/ports/commata/portfile.cmake
Line 4 in 8006ed5
| REPO furfurylic/commata |
Co-authored-by: Javier Matos Denizac <[email protected]>
|
@JavierMatosD Hey, all platform jobs passed except arm64_osx, which did not start in the pipeline (it appears skipped/not scheduled for this fork PR).
|
ports/cconfig/portfile.cmake
Outdated
| @@ -0,0 +1,19 @@ | |||
| # Fetch source from GitHub | |||
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.
| # Fetch source from GitHub |
ports/cconfig/portfile.cmake
Outdated
| SHA512 8CE0C0FCA4E55AF9CFD56BA7779F4775703752D328518FE72F242336A7D4DB08B53284CA6148FC65BDBFE7D5BE4F025F49DFC7B13A45E2B69F350E15966C1929 | ||
| ) | ||
|
|
||
| # Copy header to include/cconfig/ |
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.
| # Copy header to include/cconfig/ |
ports/cconfig/portfile.cmake
Outdated
| file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include/cconfig") | ||
| file(COPY "${SOURCE_PATH}/cconfig.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/cconfig") | ||
|
|
||
| # Install license using the vcpkg helper (required) |
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.
| # Install license using the vcpkg helper (required) |
ports/cconfig/portfile.cmake
Outdated
|
|
||
| # Remove auto-generated usage folder if present | ||
| if(EXISTS "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage") | ||
| endif() |
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.
| # Remove auto-generated usage folder if present | |
| if(EXISTS "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage") | |
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage") | |
| endif() |
No such thing. AI slop?
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.
yes this is AI slop because windows-x86 drove me crazy
ports/cconfig/project/CMakeLists.txt
Outdated
| cmake_minimum_required(VERSION 3.10) | ||
| project(cconfig-test C) | ||
|
|
||
| # Use the include path installed by vcpkg | ||
| find_path(CCONFIG_INCLUDE_DIRS "cconfig.h" | ||
| PATH_SUFFIXES "cconfig" | ||
| HINTS "${CMAKE_CURRENT_LIST_DIR}/../include" | ||
| ) | ||
|
|
||
| if(NOT CCONFIG_INCLUDE_DIRS) | ||
| message(FATAL_ERROR "Could not find cconfig.h in the include path") | ||
| endif() | ||
|
|
||
| # Create a test executable | ||
| add_executable(cconfig-test test.c) | ||
|
|
||
| # Add include directories | ||
| target_include_directories(cconfig-test PRIVATE ${CCONFIG_INCLUDE_DIRS}) |
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.
Doesn't belong to this port.
ports/cconfig/project/test.c
Outdated
| #include <stdio.h> | ||
| #include "cconfig.h" | ||
|
|
||
| int main() { | ||
| printf("cconfig header included successfully.\n"); | ||
| return 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.
Doesn't belong to this port.
ports/cconfig/vcpkg.json
Outdated
| "name": "cconfig", | ||
| "version": "1.0.0", | ||
| "description": "Header-only config parsing library", | ||
| "homepage": "https://github.com/Nouridin/cconfig" |
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.
| "homepage": "https://github.com/Nouridin/cconfig" | |
| "homepage": "https://github.com/Nouridin/cconfig", | |
| "license": "<add SPDX term here>" | null |
|
@JavierMatosD I think everything is done now. |
JavierMatosD
left a comment
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.

vcpkg.jsonmatches upstream (1.0.0).vcpkg.jsonmatches upstream (MIT)../vcpkg x-add-version --all.