Cartesius00
Cartesius00

Reputation: 24414

Building cmake static library

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

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

Answers (1)

Alexey
Alexey

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

Related Questions