<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi,
<div class=""><br class="">
</div>
<div class="">  I am using cmake version 3.1.3 on MacOSX 10.10.2. I want to build a SHARED  library made exclusively of OBJECT libraries. This works well with the Makefile generator but fails with the Xcode generator.</div>
<div class=""><br class="">
</div>
<div class="">  To reproduce the problem is very simple: </div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div class="">
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">add_library(FooObjs OBJECT foo.cxx)</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">add_library(Foo SHARED $<TARGET_OBJECTS:FooObjs>)</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">add_executable(FooMain main.cxx)</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">target_link_libraries(FooMain Foo)</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">The library libFoo.dylib is never build. I can bypass the problem by adding a dummy.cxx file to the SHARED library, but I am not convinced this is the right solution.</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">
<div style="margin: 0px;" class="">Cheers,</div>
<div style="margin: 0px;" class=""><br class="">
</div>
<div style="margin: 0px;" class=""><span class="Apple-tab-span" style="white-space:pre"></span>Pere</div>
<div style="margin: 0px;" class=""><br class="">
</div>
<div style="margin: 0px;" class=""><br class="">
</div>
<div style="margin: 0px;" class="">-------------------------------------------------------------</div>
</div>
<div apple-content-edited="true" class="">Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
<div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>e-mail: <a href="mailto:pere.mato@cern.ch" class="">pere.mato@cern.ch</a><span class="Apple-tab-span" style="white-space: pre;">
</span>tel:   +41 22 76 78696</div>
<div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>fax:  +41 22 76 68792<span class="Apple-tab-span" style="white-space: pre;">
</span>gsm: +41 76 48 70855</div>
</div>
<br class="">
</div>
</body>
</html>