Problem / use case
libchttpx currently provides Makefile builds, pkg-config metadata, native Linux packages, installer scripts, and Docker images. C/C++ projects that use CMake still need custom include/library discovery or shell installation steps.
Providing a first-class CMake package would make the library easier to consume as both an installed dependency and a source dependency, especially in cross-platform projects and CI.
Proposed solution
Add a maintained CMakeLists.txt and exported CMake package target.
Desired consumer experience after system installation:
find_package(libchttpx CONFIG REQUIRED)
target_link_libraries(my_server PRIVATE libchttpx::libchttpx)
And optionally directly from source:
include(FetchContent)
FetchContent_Declare(libchttpx GIT_REPOSITORY https://github.com/netcorelink/libchttpx.git GIT_TAG vX.Y.Z)
FetchContent_MakeAvailable(libchttpx)
target_link_libraries(my_server PRIVATE libchttpx::libchttpx)
Acceptance criteria
- CMake can build the shared library on supported Linux and Windows configurations.
cmake --install installs headers, library, and libchttpxConfig.cmake/version metadata.
- Installed package exports
libchttpx::libchttpx.
- cJSON and platform dependencies are propagated correctly to consumers.
FetchContent/add_subdirectory use does not modify global compiler settings unnecessarily.
- Existing Makefile and pkg-config workflows continue to work.
- CI builds a small consumer project using both
find_package and FetchContent.
- Native packages include the CMake config files.
- EN/RU installation documentation includes CMake examples.
Problem / use case
libchttpx currently provides Makefile builds, pkg-config metadata, native Linux packages, installer scripts, and Docker images. C/C++ projects that use CMake still need custom include/library discovery or shell installation steps.
Providing a first-class CMake package would make the library easier to consume as both an installed dependency and a source dependency, especially in cross-platform projects and CI.
Proposed solution
Add a maintained
CMakeLists.txtand exported CMake package target.Desired consumer experience after system installation:
And optionally directly from source:
Acceptance criteria
cmake --installinstalls headers, library, andlibchttpxConfig.cmake/version metadata.libchttpx::libchttpx.FetchContent/add_subdirectoryuse does not modify global compiler settings unnecessarily.find_packageandFetchContent.