Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to generate restbedConfig.cmake #516

Open
navyverma opened this issue Apr 7, 2022 · 1 comment
Open

Unable to generate restbedConfig.cmake #516

navyverma opened this issue Apr 7, 2022 · 1 comment

Comments

@navyverma
Copy link

navyverma commented Apr 7, 2022

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
Copy link

madebr commented Oct 22, 2022

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 library
  • Restbed::Restbed-static for the static restbed library

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants