Are the commands "cmake -build . --target package" and "cpack ." equivalent?

Turns out that’s not accurate. cpack will run the cmake_install.cmake script, it won’t build the install target. I did some local testing to confirm that my original comment was correct: cmake --build . --target package will also build the all target first, whereas running cpack directly won’t.