CPACK_PACKAGING_INSTALL_PREFIX not substitued in user specified spec (Prefix continues to use /usr/local)
inside CMakeLists.txt
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt") set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/mytest_own.spec")
inside spec file
Prefix: @CPACK_PACKAGING_INSTALL_PREFIX@
Result (Error behaviour)
Generated rpm has /usr/local instead of /opt for Relocations