[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

[CMake] target_link_libraries not populating INCLUDE_DIRECTORIES?

2018-12-21 Thread Ciccio Pasticcio
Hi all, considering the following CMakeLists.txt: PROJECT(lib_foo) ADD_LIBRARY(lib_foo SHARED ) TARGET_INCLUDE_DIRECTORIES(PRIVATE private/ PUBLIC inc/) FIND_PACKAGE(Boost 1.55 REQUIRED COMPONENTS chrono system) TARGET_LINK_LIBRARIES(lib_foo PRIVATE Boost::chrono Boost::system)

[CMake] Dependency managment

2018-12-12 Thread Ciccio Pasticcio
Hi all, we are trying to re-design the build system of an existing complex project using cmake. We have a source tree such this (it is only an example to help explaining the problem) . └── libs ├── CMakeLists.txt ├── libA │ ├── CMakeLists.txt │ ├── include │ │ └──

[CMake] CPU specific compiler flags

2018-11-26 Thread Ciccio Pasticcio
Hi all, I'm refactoring some libraries cmake files to be compliant to the use of targets instead of tons of variables. Since these libraries are cross-compiled I'm facing some problem finding how to properly set some specific flags like: -march -marm -mfloat-abi etc. For now I set the