- First you need to compile and install two_libraries
- Second you need to compile and install simple_library
- Last you can compile your executable
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.
cd ./libs/two_libraries
mkdir build
cmake -S . -B build/
cmake --build build/
cmake --install build/ --prefix /home/<user>/libs/cmake_ex_2libs
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
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"