Question

I am developping a static library and I would like to be able to export the library and a part of the interfaces I use in it. Is there any tool to automate that process (other than writing a makefile by hand) ?

For exemple let's say I have a library coded in the following directory structure:

  • mystuff/
    • main_entry_point_of_the_lib.h
    • some_code.cpp
    • innerfolder/
      • an_interesting_interface.h
      • some_code.cpp
    • innerfolder2/
      • an_uninteresting_interface.h
      • some_code.cpp

I would like to create the following structure:

  • mystuff/
    • main_entry_point_of_the_lib.h
    • innerfolder/
      • an_interesting_interface.h
    • innerfolder2/
      • an_uninteresting_interface.h
Was it helpful?

Solution

You can use CMake for this. It's easy to use but really powerful. See here for documentation.

Some Pros:

  • Very powerful / configurable
  • easy to use
  • simple to add a cmake library to other (cmake) projects
  • Commandline and GUI available
  • Available on all major platform
  • supports native- and cross compiling
  • can generate project files for various IDE's incl. Makefiles

Some more documentation:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top