Skip to content

tfoerst3r/simple_dependency_example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiling process

  • First you need to compile and install two_libraries
  • Second you need to compile and install simple_library
  • Last you can compile your executable

Compiling in a bash

You need to have cmake installed. The instructions are stored in run.sh.

In the run.sh you need to change user=<user_name> to your user name.

Library 'two_libraries':

cd ./libs/two_libraries
mkdir build
cmake -S . -B build/
cmake --build build/
cmake --install build/ --prefix /home/<user>/libs/cmake_ex_2libs

Library 'simple_libraries':

cd ..
cd simple_library
mkdir build
cmake -S . -B build/ -D CMAKE_PREFIX_PATH="/home/<user>/libs/cmake_ex_2libs/cmake"
cmake --build build/
cmake --install build/ --prefix /home/<user>/libs/cmake_ex_1lib

Executable 'Main'

cd ../../app/
mkdir build
cmake -S . -B build/
cmake -S . -B build/ -D CMAKE_PREFIX_PATH="/home/<user>/libs/cmake_ex_2libs/cmake;/home/<user>/libs/cmake_ex_1lib/cmake"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 62.0%
  • C++ 21.1%
  • Shell 16.9%