Reputation: 24414
I have a project (static library) say of this form:
rootlib/
CMakeLists.txt (1)
src1.c
sublib1/
CMakeLists.txt (2)
subsrc1.c
sublib2/
CMakeLists.txt (3)
subsrc2.c
CMakeLists.txt
I do add_library(... sources)
target_link_libraries(rootlib sublib1 sublib2)
After make
, I have three *.a
files that are nowhere merged together. All I want to do now, is to create (automatically) a static library (i.e. merge everything).
Upvotes: 2
Views: 4808
Reputation: 948
You may use Cmake 2.8.8 with new feature - object library: http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library
Or write by yourself via add_custom_target
Upvotes: 4