Re: [CMake] Binaries linking interface library

2019-01-16 Thread Robert Maynard via CMake
The cause of the downstream failure ( cmake adds "-lLibMinimal" to the linker ) is caused by the the cmake install(EXPORT) error. You need to have LibMinimal in your export set so that CMake at export time is aware that it is an interface library and generates the correct import interface target t

[CMake] Binaries linking interface library

2019-01-16 Thread Ciccio Pasticcio
Hello all, I've got a simple, header only, interface library. Following the whole CMakeLists.txt CMAKE_MINIMUM_REQUIRED(VERSION 3.0) INCLUDE(CommonLib) PROJECT(LibMinimal) ADD_LIBRARY(${PROJECT_NAME} INTERFACE ) TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE "${PROJECT_SOURCE_DIR}/incl