-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[ankurvdev-embedresource] adding new port #34401
Conversation
This needs a host tool when consomed. We must ensure that everything is always used from the vcpkg installation, not loaded via FetchContent. It might help to have a CI test port. |
I've got vcpkg tests in the source repo already.CMakeLists.txt Did you mean tests in the vcpkg repo ? Is there a pattern i can follow for creating a ci test port ?
All I could find was cmakerc. |
I consider the resource compiler topic sensitive to cross-build issues. That's why I ask for test port, given the young project. Disclaimer: I'm only a community member.
This one was just merged: The idea is to have a CMake project which is not tightly coupled with vcpkg (in the form of ci/sample/CMakeLists.txt), but uses the minimal CMake syntax without any assumptions about vcpkg, such as the soci test project. Basically the example from the README, decorated with a project header.
Maybe |
Thanks for the pointers. Yeah I agree these sorts of cross-compile projects are extremely useful for any form of codegen tools The CI project in source repo does cover cross-compilaton for the following triplets build
Basically, The ci sample project is used to test both vcpkg-mode and add_subdirectory-mode (no cross-compile) which are listed on the README as integration choices. That said, if you think it'll be prudent, |
@dg0yt Could you advise ? |
That I would add a post-install fixup in the vcpkg portfile, based on the known vcpkg install layout. Something like file(READ "${CURRENT_PACKAGES_DIR}/share/embedresource/EmbedResourceConfig.cmake" config)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/embedresource/EmbedResourceConfig.cmake" "
find_program(EMBEDRESOURCE_EXECUTABLE embedresource PATHS "\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}/tools/embedresource" REQUIRED)
${config}") (Edit: removed backslash in last line.) |
1fa10d2
to
5caf9a2
Compare
That didnt quite work. HOST_TRIPLET wasnt defined |
Be careful about the variables and escaping. |
Thanks |
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 have another set of comments. It should be the last set from my side (community).
@dg0yt, thank you for the review! @ankurvdev, the port LGTM, but since this is a young project and it doesn't show up on repology, would you mind adding a prefix to the name? |
Can you suggest a prefix ? |
ankurvdev-embedresource? |
e656d02
to
775c15a
Compare
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxxvcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.