Skip to content

AndreiCherniaev/cpack_outside_of_build_folder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use this repo to reproduce my steps for cpack https://stackoverflow.com/questions/77554809/cpack-b-build-fails-in-parent-directory

Clone and build

git clone https://github.com/AndreiCherniaev/cpack_outside_of_build_folder
cd cpack_outside_of_build_folder
cmake -S src/ -B build/ -DCMAKE_BUILD_TYPE=Release --fresh
cmake --build build/ --parallel

Make deb packet

Incorrect way

cpack -B build/ --trace --verbose

In my case I get
CPack Error: CPack generator not specified

Correct way

cpack --config build/CPackConfig.cmake -B build/

Install deb

sudo dpkg -i build/cpack_test1-0.1.1-Linux.deb

Remove deb

sudo dpkg -r cpack_test1