[ankurvdev-embedresource] adding new port#34401
[ankurvdev-embedresource] adding new port#34401JavierMatosD merged 2 commits intomicrosoft:masterfrom
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 |
dg0yt
left a comment
There was a problem hiding this comment.
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_packagecalls are REQUIRED, are satisfied byvcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxxvcpkg.jsonmatches what upstream says.vcpkg.jsonmatches what upstream says../vcpkg x-add-version --alland committing the result.