Re: [CMake] help with OBJECT libraries hierarchy

2016-06-22 Thread Petr Kmoch
Ahoj Miro, object libraries are not intended for linking. The way it works is you expand the $ genex into the list of *sources* of the consuming target. In other words, the string '$' needs to go into the add_executable(foo) or add_library(foo) command, not into target_link_libraries(foo). Petr

[CMake] help with OBJECT libraries hierarchy

2016-06-22 Thread Ilias Miroslav
Dear experts, I am trying to introduce OBJECT libraries into our project, http://www.diracprogram.org. Into local src/functionality1/CMakeLists.txt I changed add_library(main ${local_sources}) to add_library(main OBJECT ${local_sources})