Open navyverma opened 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:
Restbed::Restbed
for the shared libraryRestbed::Restbed-static
for the static restbed librarySo 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)
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.