Skip to content
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

vcpkg port? #254

Open
davidchisnall opened this issue Aug 4, 2021 · 2 comments
Open

vcpkg port? #254

davidchisnall opened this issue Aug 4, 2021 · 2 comments

Comments

@davidchisnall
Copy link
Contributor

It would be great to have libucl support in vcpkg.

davidchisnall added a commit to davidchisnall/libucl that referenced this issue Aug 22, 2021
 - Update the version info
 - Don't expose a private header directory as public
 - Publish an exported target

With this, it's possible to just import the installed targets.  I have a
small overlay port for vcpkg on top of this that lets me import libucl,
which is a first step towards fixing vstakhov#254.
@davidchisnall
Copy link
Contributor Author

I have this as an overlay port:

portfile.cmake:

vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO vstakhov/libucl
    REF 95df30cf3e35788c08be537a1623499c98415674
    SHA512 8c61061d3fa02283f700ac6a5ddb035348c67ec4e45d30a47da945a39adffda5f3bc8db6fae35544185983e3204efd7bdef55b145d2a387a04d06aecca461ea3
    HEAD_REF master
)

vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/ucl TARGET_PATH share/ucl)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libucl RENAME copyright)

vcpkg.json:

{
        "name": "libucl",
        "version-string": "0.8.2",
        "description": "Library for manipulating the Universal Configuration Language"
}

With this, I am able to build and incorporate libucl into my project. This doesn't handle any of the optional bits (libcurl / libfetch integration, lua / python bindings).

I am happy to submit this to vcpkg if you like, or you're welcome to use them as the starting point for a richer integration.

@vstakhov
Copy link
Owner

Thank you very much for this work, David. I would suggest you to submit this as a starting point and then probably gather feedback from users (if any) for further improvements. I don't use vcpkg, so I cannot properly test it I'm afraid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants