-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
CMakeLists file missing export #257
Comments
It's already possible to include cppformat in a CMake project via |
Yes. Suppose I have library A which links cppformat and I want all users of library A to transitively link cppformat as well if they link A. Further, suppose I want A to be exported. The export will fail because A now publicly links cppformat which is not part of the export list. I'm not sure how to resolve this without directly modifying cppformat's CMakeLists.txt itself. It would be nice if an option was provided to specify an export list (optionally). My Cmake-fu is not 100% yet, but I believe this is the correct use case. |
It's possible to simply add cppformat with add_subdirectory(cppformat)
export(TARGETS cppformat FILE test.cmake) Will it work for you? |
I was referring to adding the cppformat target to an existing export list which isn't possible outside of the cppformat CMakeLists.txt file I believe. I'll play around with things some tomorrow and see if I can get something to work. |
It would help if you showed an example of what you are expecting to have in the cppformat's |
@jeremyong, have my suggestion worked for you or have you found an alternative? |
Fixed by #264. |
This would be nice to allow the cppformat project to be transitively included in an existing CMake build tree without requiring a separate make install step.
The text was updated successfully, but these errors were encountered: