Hi Robert,

We have a similar requirement, so I basically run “ar -x” to explode all of the 
static libraries into their constituent pieces, and then run “ar cr" to 
recombine them into one monolithic static library. This is done via Gradle, 
after it runs CMake to build the static libraries in the first place. Probably 
not the answer you’re looking for, but I’m sure you can write a custom 
post-build step in CMake to do the same.
 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 8/23/16, 3:30 AM, "CMake on behalf of Robert Bielik" 
<[email protected] on behalf of [email protected]> wrote:

    I just realized this is in error, issue is closed.
    
    But I still have the need to combine several static libraries into ONE 
static library.
    
    There seems to be descriptions of solutions to this, but they are rather 
convoluted, so is there an "easy" way of doing:
    
    add_library(foo STATIC <sources_foo>)
    add_library(bar STATIC <sources_bar>)
    add_library(baz STATIC <sources_baz>)
    target_link_libraries(baz foo bar)
    
    with baz containing ALL libraries ?
    
    Regards
    /Robert
    
    
    >-----Original Message-----
    >From: CMake [mailto:[email protected]] On Behalf Of Robert Bielik
    >Sent: den 23 augusti 2016 08:26
    >To: [email protected]
    >Subject: [CMake] Xcode generator problems
    >
    >Hi all,
    >
    >I just opened https://gitlab.kitware.com/cmake/cmake/issues/16260, anyone
    >have ideas how to work around it ? Or if it is fixed in latest & greatest 
CMake ?
    >
    >Regards
    >/Robert
    >--
    >
    >Powered by www.kitware.com
    >
    >Please keep messages on-topic and check the CMake FAQ at:
    >http://www.cmake.org/Wiki/CMake_FAQ
    >
    >Kitware offers various services to support the CMake community. For more
    >information on each offering, please visit:
    >
    >CMake Support: http://cmake.org/cmake/help/support.html
    >CMake Consulting: http://cmake.org/cmake/help/consulting.html
    >CMake Training Courses: http://cmake.org/cmake/help/training.html
    >
    >Visit other Kitware open-source projects at
    >http://www.kitware.com/opensource/opensource.html
    >
    >Follow this link to subscribe/unsubscribe:
    >http://public.kitware.com/mailman/listinfo/cmake
    -- 
    
    Powered by www.kitware.com
    
    Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ
    
    Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:
    
    CMake Support: http://cmake.org/cmake/help/support.html
    CMake Consulting: http://cmake.org/cmake/help/consulting.html
    CMake Training Courses: http://cmake.org/cmake/help/training.html
    
    Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html
    
    Follow this link to subscribe/unsubscribe:
    http://public.kitware.com/mailman/listinfo/cmake
    

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to