Corvusoft / restbed

Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.
http://www.corvusoft.co.uk
Other
1.93k stars 379 forks source link

Unable to generate restbedConfig.cmake #516

Open navyverma opened 2 years ago

navyverma commented 2 years ago

I'm trying to build restbed using cmake and I got success in it. But cmake is not generating cmake files for Config and Target so that other cmake based applications will be able to find restbed libs and header files.

madebr commented 2 years ago

Is there a preference how the config file should be named and what name(s) the targets should have? I propose RestbedConfig.cmake, providing:

So users can include restbed in their project using:

cmake_minimum_required(VERSION 3.0)
project(my_http_server CXX)
find_package(Restbed REQUIRED CONFIG)

add_executable(my_http_server main.cpp)
target_link_libraries(my_http_server PRIVATE Restbed::Restbed)

add_executable(my_static_http_server main.cpp)
target_link_libraries(my_static_http_server PRIVATE Restbed::Restbed-static)