<div dir="ltr">Hi,<div><br></div><div>I have an interface library and I am not sure how I would get CMake to generate the usual <lib>-config.cmake file for the library so that I can then use "find_package" on the interface library from an external project.</div><div><br></div><div>I am adding (and installing) the library like this:</div><div><br></div><div>add_library(myLib INTERFACE)</div><div>target_include_directories(myLib INTERFACE</div><div>    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include><br>    $<INSTALL_INTERFACE:include/><br>    )<br><br>and then installing like this:<br><br>install(TARGETS myLib EXPORT myLib_targets INCLUDES DESTINATION include)</div><div>install(EXPORT myLib_targets DESTINATION "lib/cmake")<br></div><div>install(FILES ${MY_HEADERS} DESTINATION "include/")<br></div><div><br></div><div>Obviously, I am doing it wrong or missing some steps as I do not see the myLib-config.cmake file anywhere in the install folder (or the build directory for that matter) that is usually generated when using install commands.</div><div><br></div><div>Ultimately, I would like to use the "find_package" command on the interface library from another CMake project.</div><div><br></div><div>Thank you,</div><div>Saad</div></div>