[CMake] Referencing an OBJECT library

Edward Diener eldlistmailingz at tropicsoft.com
Thu Jul 20 16:57:00 EDT 2017


According to the CMake docs for an OBJECT library called, let's say, 
'xxx', the reference to that OBJECT library is through 
$<TARGET_OBJECTS:xxx>. I understand this but I am curious about the 
reason for such syntax. After all a STATIC or SHARED library 'xxx' you 
can just use xxx to refer to the library. Why the difference in CMake 
syntax reference between OBJECT libraries added with the add_library 
command and STATIC or SHARED libraries added with the add_library command ?



More information about the CMake mailing list