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

[effolkronium-random] Properly handle package_name #20795

Closed
michaelkroener opened this issue Oct 16, 2021 · 1 comment · Fixed by #20816
Closed

[effolkronium-random] Properly handle package_name #20795

michaelkroener opened this issue Oct 16, 2021 · 1 comment · Fixed by #20816
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@michaelkroener
Copy link


Is your feature request related to a problem? Please describe.
Since version 1.3.1 the port suggested find_package(effolkronium-random CONFIG REQUIRED) this did not work you had to use
ind_package(effolkronium-random CONFIG REQUIRED) after the last update to the port 1.4.0 neither of both options work as it can't properly find the cmake config files anymore.

Proposed solution
I already answered in the pull request #20496 after it stopped working

vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO effolkronium/random
    REF v1.4.0
    SHA512 B3DDEC048BBFB48877FD12295D4E0492E25976E1C4FE66F13E9E6E611DAAF654BD8D4AE75EA75125CB5AB420B82472C1CC1AB0BED3AEF632911B0934B45B23AF
    HEAD_REF master
)

vcpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
		-DRandom_BuildTests=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME "effolkronium_random" CONFIG_PATH "cmake")
vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${SOURCE_PATH}/LICENSE.MIT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

Describe alternatives you've considered
I renamed the config files to both variatons of the name thats not really a alternative but it worked.

Additional context
Add any other context or screenshots about the feature request here.

@NancyLi1013 NancyLi1013 self-assigned this Oct 18, 2021
@NancyLi1013 NancyLi1013 added the category:port-bug The issue is with a library, which is something the port should already support label Oct 18, 2021
@NancyLi1013
Copy link
Contributor

Hi @michaelkroener

Thanks for posting this issue.

Since package name effolkronium-random is different from ${PROJECT_NAME} https://github.com/effolkronium/random/blob/master/CMakeLists.txt#L4.

Your proposal is correct. Thanks for figuring this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants