-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[enet] Export config, support BUILD_SHARED_LIBS, and add usage #20282
Conversation
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.
@Spirrwell, thanks for the PR!
Could you also update the port-version in vcpkg.json file?
Ah neat, so I don't need a manual usage. Sorry this is my first time. I'm okay with everything, except the port version in vcpkg.json seems to be based on the latest release of enet v1.3.17, so I'm not sure what I should change it to. |
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.
You have modified or added at least one portfile where deprecated functions are used.
If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake
-> vcpkg_cmake_install
(from port vcpkg-cmake
)
vcpkg_build_cmake
-> vcpkg_cmake_build
(from port vcpkg-cmake
)
vcpkg_configure_cmake
-> vcpkg_cmake_configure
(Please remove the option PREFER_NINJA
) (from port vcpkg-cmake
)
vcpkg_fixup_cmake_targets
-> vcpkg_cmake_config_fixup
(from port vcpkg-cmake-config
)
In the ports that use the new function, you have to add the corresponding dependencies:
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
The following files are affected:
ports/enet/portfile.cmake
@Spirrwell, the port-version is a positive integer value that increases each time a vcpkg-specific change is made to the port. See port-version. After all changes has been committed, we need to update the version database via command './vcpkg x-add-version enet', and submit the changes finally. |
Ah I see, sorry for all of my blunders. Thank you very much! |
No problem, thanks for your contribution! |
Thanks for de-staticifying :D |
This pull request addresses issue #20230 which I opened.
As the title says, this adds support for building enet as a shared library using CMake's built in BUILD_SHARED_LIBS. This also exports a config and outputs usage to make it more friendly to use.
I'm not certain that this matters with vcpkg, but I also bumped the CMake minimum version to 3.0.2 which I believe is the minimum version to support what was needed based on reading CMake documentation.
Extra Info:
I did open an issue on the enet repository here: lsalzman/enet#174 to ask about hopefully improving their existing CMakeLists.txt to be more vcpkg friendly. and it does seem that they are not against that, but it seems all previous efforts have gone without feedback anyway.