1 | initial version |
Add the submodule to the main module's repository:
git submodule add
to add the submodule to the main module's repository.git rm --cached <submodule_dir>
and then add it as a submodule with git submodule add
.Configure the CMakeLists.txt file:
include_directories(<submodule_dir>/include)
add_subdirectory(<submodule_dir>)
target_link_libraries(<main_module_executable> <submodule_library>)
Build the project:
cmake
to generate the build files for the main module, including the submodule.make
or the appropriate build tool for your platform.Note: The submodule must have its own CMakeLists.txt file with instructions on how to build the shared or static library.