-
Notifications
You must be signed in to change notification settings - Fork 90
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
Package modern-cpp-kafka with vcpkg #200
Comments
I also note that the HINTS in the CMakeLists.txt file seem to be Linux specific. Will this still work on Windows (I need to target both Linux and Windows):
|
Hi, @BenSleat |
Note:
Currentlly it export with install(TARGETS modern-cpp-kafka EXPORT unofficial-modern-cpp-kafka)
install(
EXPORT unofficial-modern-cpp-kafka
FILE unofficial-modern-cpp-kafka-config.cmake
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/unofficial-modern-cpp-kafka"
NAMESPACE unofficial::modern-cpp-kafka::
)
install(
DIRECTORY "${CMAKE_SOURCE_DIR}/include/kafka"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
) Allow follwing usage find_package(unofficial-modern-cpp-kafka CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::modern-cpp-kafka::modern-cpp-kafka) It would be better if we provide an official export so I can drop the find_package(modern-cpp-kafka CONFIG REQUIRED)
target_link_libraries(main PRIVATE modern-cpp-kafka::modern-cpp-kafka) @kenneth-jia If that look good for you, I can make a pr for this. |
It would be great if you could create a vcpkg packaged version of modern-cpp-kafka.
I've tried creating one myself (I'm new to creating vcpkg packages) but I'm having problems with the CMakeLists.txt file. Specifically line 66 is complaining that it can't find the librdkafka headers, even though I've set librdkafka as a dependency in vcpkg.json. It looks like the CMakeLists.txt expects the headers location to be set through env vars, which isn't the right way to do it with a vcpkg package.
The text was updated successfully, but these errors were encountered: