Skip to content
Hans Kirchner edited this page Aug 28, 2015 · 6 revisions

In a nutshell it's code that serves functions. Libraries are used by Modules.

In config repos they are contained in external/libraries. Each library is contained in its own git repository.

The library's folder structure is standardized as followed:

  • src - The source folder containing *.cpp files
  • include - The header folder containing *.h files
    • CMakeSharedHeaders.txt - Folders containing this file will be made includable throughout the global config repository
  • CMakeLists.txt - Compile commands for CMake
  • README.md - Library description and information

Naming

Libraries should be suffixed with _lib. The include folder should contain a folder named after the library.

CMakeLists.txt

Example:

set ( SOURCES
  src/library_code.cpp
)

set (HEADERS
  include/library/library_code.h
)

include_directories(include)
add_library(library_lib SHARED ${SOURCES} ${HEADERS})
target_link_libraries(library_lib PRIVATE lmscore)
Clone this wiki locally