libstud-uuid
libstud-uuid copied to clipboard
Add CMake support
Add the ability to include and build the project as a dependency using CMake
Example project that uses this library with CMake:
./CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(dymmy-proj)
add_subdirectory(contrib)
add_executable(dummy
src/main.cpp
)
target_link_libraries(dummy
PRIVATE
libstud-uuid
)
./contrib/CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
include(FetchContent)
FetchContent_Declare(
libstud-uuid
GIT_REPOSITORY https://github.com/kgamora/libstud-uuid # As it's not in main for now, example uses my fork
GIT_TAG origin/add-cmake-support # This is not standard for the same reason
)
FetchContent_MakeAvailable(libstud-uuid)
./main.cpp
Content of tests/basics/driver.cxx
To build and run:
cmake -B build && cd build && make && ./dummy && echo "test was successful"
Please see earlier PR with the same aim: https://github.com/libstud/libstud-uuid/pull/2
The position expressed has not changed and the offer to point to a fork where you will maintain CMake support stands.