jarro2783 / cxxopts

Lightweight C++ command line option parser
MIT License
4.16k stars 582 forks source link

What cmake targets are defined? #432

Closed VictorEijkhout closed 3 months ago

VictorEijkhout commented 3 months ago

I'm trying to include cxxopts in a project. My random guess:

include( FetchContent )
FetchContent_Declare(
    cxxopts GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git )
FetchContent_MakeAvailable( cxxopts )
target_include_directories( ${PROJECT_NAME} INTERFACE cxxopts::cxxopts )
target_link_libraries( ${PROJECT_NAME} INTERFACE cxxopts::cxxopts )

leads to unresolved symbols. Could you document what the .cmake files provide?

jarro2783 commented 3 months ago

What are the unresolved symbols? That looks like it's the right target, although I'm not familiar with including a project in that way. There is only one header, so I'm not sure what could actually be missing.

VictorEijkhout commented 3 months ago

I upgraded to 3.2.0 and now that target works. Thanks.