Question: error with linking third-party header-only lib (which is git submodule) to another header-only lib.
Dear all,
I apologize if my question is stupid. I am new in CMAKE and C++.
In my project (hello-world header-only lib) I want to use another third-party header-only lib as git submodule. But I don't know how to correctly link third-party submodule lib to my lib. In this repository: https://github.com/GillianGrayson/header_only_lib I create very simple header-only lib (main cmake file copied from https://github.com/gabime/spdlog). In order for my library to be displayed correctly in the IDE, I use the add_custom_target with all .h files as SOURCE arguments. But the problem is that in this case the headers from thrird-party submodule are not found: cannot open source file (error file is header_only_lib/include/header_only_lib/logger.h) But headers from third-party lib are explicitly included: include_directories(${THIRD_PARTY_INCLUDE_PATH}). How to include correctly headers from third-party header-only lib (which is git submodule) to my header-only lib?
Thanks for help!