<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello all,</div><div>I've got a simple, header only, interface library. Following the whole CMakeLists.txt</div><div></div><div><br></div><div>CMAKE_MINIMUM_REQUIRED(VERSION 3.0)<br><br>INCLUDE(CommonLib)<br>PROJECT(LibMinimal)<br>ADD_LIBRARY(${PROJECT_NAME} INTERFACE )<br><br>TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} <br> INTERFACE "${PROJECT_SOURCE_DIR}/include"<br> INTERFACE "${PROJECT_SOURCE_DIR}/include/inc_arm"<br>)<br><br>INSTALL (DIRECTORY "include/"<br> DESTINATION ${INSTALL_LIBS_INCLUDE}<br> FILES_MATCHING <br> PATTERN "*.h"<br> PATTERN "*.hpp"<br>)</div><div><br></div><div>Then I use it in all my others libraries as follow:</div><div><br></div><div>TARGET_LINK_LIBRARIES(<target> PRIVATE LibMinimal ...)</div><div><br></div><div>When I build the whole source tree I get all my .so and .a, even if I get this error while configuring the whole source tree:<br></div><div><div><br></div><div>CMake
Error: install(EXPORT "hwifcTarget" ...) includes target "hwifc-static"
which requires target "LibMinimal" that is not in the export set.</div><div><br></div><div>hwifc is a static library. (I have other problem related to that library tho).<br></div></div><div><br></div><div>When I link one of my library in an application cmake adds "-lLibMinimal" to the linker, why? INTERFACE library shouldn't produce any output, right? This obviously breaks the build, since there is no library file.<br></div><div><br></div><div>Any idea?</div><div><br></div><div>Thanks,</div><div>Gabriele<br></div><div><br></div><div><br></div><div><br></div></div></div></div>