[CMake] Xcode generator ignores shared library made of object libraries
Pere Mato Vila
Pere.Mato at cern.ch
Mon Mar 9 07:59:00 EDT 2015
Hi,
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.
To reproduce the problem is very simple:
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
add_library(FooObjs OBJECT foo.cxx)
add_library(Foo SHARED $<TARGET_OBJECTS:FooObjs>)
add_executable(FooMain main.cxx)
target_link_libraries(FooMain Foo)
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.
Cheers,
Pere
-------------------------------------------------------------
Pere Mato CERN, PH Department, CH 1211 Geneva 23, Switzerland
e-mail: pere.mato at cern.ch<mailto:pere.mato at cern.ch> tel: +41 22 76 78696
fax: +41 22 76 68792 gsm: +41 76 48 70855
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150309/c2a92d42/attachment.html>
More information about the CMake
mailing list