fpagliughi / sockpp

Modern C++ socket library.
BSD 3-Clause "New" or "Revised" License
782 stars 126 forks source link

The cmake doesn't generate config file to be included as a 3th party project #45

Closed arsdever closed 1 year ago

arsdever commented 4 years ago

I am developing a library, which uses come 3rd party libraries including this one. For the other libraries, I was able to include them using the following CMakeLists.txt code:

find_package(package_name REQUIRED)
target_link_libraries(my_target_name PRIVATE package_name::package_name)

but for this one, it says the following:

Could not find a package configuration file provided by "sockpp-static" with any of the following names: sockpp-staticConfig.cmake sockpp-static-config.cmake

varunsh-xilinx commented 2 years ago

@fpagliughi I saw you pulled these changes into the cmake-refactor branch. Are you planning on merging it to master in the near future?

fpagliughi commented 2 years ago

@varunsh-xilinx I've been trying to learn more CMake, but haven't been doing a lot of C++ programming lately, so it's been slow. I will go back to testing it and see what I still needed to do to finish, but if you try it, let me know how it works out for you.

varunsh-xilinx commented 2 years ago

I'm using the cmake-refactor branch currently and it seems to work fine. Great work on this project btw!

stephenaa commented 1 year ago

Using the cmake-refactor branch, what is the correct way of bringing this into another, top-level, CMake project?

varunsh-xilinx commented 1 year ago

@stephenaa I'm just installing this project using the cmake-refactor branch. Then, in the other CMake project, I'm using find_package(sockpp) and then linking to it as in the code snippet above.

fpagliughi commented 1 year ago

This should finally be fixed with a released version - v0.8.0