Adding a basic CMakeLists for building a static library
Based on @ckerr code at https://github.com/transmission/libpsl/blob/692c69d2415e1b20378030c08607935a54434087/CMakeLists.txt
Adapted for upstream.
Added a cross-platforms workflow to trigger it on each pull request (ubuntu, windows, macos).
Please add CMakeLists.txt to EXTRA_DIST in Makefile.am. That adds the file to the tarball, so that the instructions also work when building from tarball.
Asking for the sake of clarity...
What's the overall desired goal for CMake support. e.g. is this about using it via add_subdirectory from another CMake project?
In my use case (Transmission), yes:
- We have libpsl as submodule under "third-party".
- We do
add_subdirectory("third-party/libpsl" "${PROJECT_BINARY_DIR}/third-party/libpsl.bld")
https://github.com/transmission/transmission/blob/b372f7b193a2c02864af33093295d26b7caacfb7/CMakeLists.txt#L554-L555 https://github.com/transmission/transmission/blob/b372f7b193a2c02864af33093295d26b7caacfb7/cmake/TrMacros.cmake#L148