How to create a cmake header-only library that depends on external header files?

后端 未结 3 354
温柔的废话
温柔的废话 2020-12-30 04:56

I have a project with the following file structure:

project
 |
 |-------> lib1
 |           |----> lib1.h
 |
 |-------> lib2
 |           |---->          


        
3条回答
  •  温柔的废话
    2020-12-30 05:52

    This problem was due to full path issue of INTERFACE library files, which got fixed in cmake version 3.13.

    For more info: https://gitlab.kitware.com/cmake/cmake/issues/17556

    This page also contains an example for better understanding.

提交回复
热议问题