I want to install my library from the deb package and use it in another project on cmake For this, I made the file FooConfig.cmake and FooConfigVersion.cmake which after installing the package are in /usr/lib/cmake/Foo
FooConfig.cmake file:
@PACKAGE_INIT@ set(Foo_INCLUDE_DIRS "/usr/include/Foo1.0/include") set(Foo_LIBRARY_DIRS "/usr/lib/Foo1.0") In the application in which I want to use the library I am writing
find_package(Foo 1.0.2 CONFIG REQUIRED) ... target_include_directories(${PROJECT_NAME} Foo_INCLUDE_DIRS) Next, I want to build the application, run cmake, and he finds the Foo package, otherwise he would give an error. But I cannot specify the include folder.
How can I do it?