-
Notifications
You must be signed in to change notification settings - Fork 4
Library
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
Libraries should be suffixed with _lib. The include folder should contain a folder named after the library.
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)