<div dir="ltr"><div><div><div><div><div><div><div>Hi Edward.<br><br>"the reference to that OBJECT library is through $<TARGET_OBJECTS:xxx>" - that is not quite true. When you're referring to the object library target itself (e.g. reading its properties), you use its name just like with any other target:<br><br></div>  get_property(someVar TARGET xxx PROPERTY TYPE)<br><br></div>However, the genex $<TARGET_OBJECTS:xxx> is used when you're specifying that the sources of another target yyy are to include the objects comprising the object library xxx:<br><br></div>  add_executable(yyy main.cpp $<TARGET_OBJECTS:xxx>)<br><br></div>Here, you're not dealing with the object library xxx itself, but with the objects from which it's composed, so you're referring to these objects explicitly. It's quite similar to how you'd use other properties of a target:<br><br></div>  target_sources(yyy $<TARGET_PROPERTY:xxx,SOURCES>)<br><br></div>would similarly add all sources of target xxx to the target yyy.<br><br></div>Petr<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 July 2017 at 22:57, Edward Diener <span dir="ltr"><<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@tropicsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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 ?<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/cmake</a><br>
</blockquote></div><br></div>