On the web page https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds the following text appears: Targeted release: Fedora 33
I am testing output of source builds on Fedora 33 using the following command in a SPEC directory rpmbuild -ba <package>.spec where <package> is my package name.
When I run rpmbuild, the soruce code gets upacked in the directory BUILD/<package>-<version> where <version> is the package version, so I am trying the 'out of source build' with the following in the spec file: %cmake -S <package>-version -B cmake_dir .. CMake appears to run correction and output its files in BUILD/cmake_dir.
One problem I am having is that I seem to need to put 'cd cmake_dir' directly after the '%cmake' command or my make command fails ? I also seem to have to put 'cd cmake_dir' other places ?
Another problem I am having is that an include sub-directory of the source directory <package>-version needs to be installed while the rest of the installed files are in the build directory cmake_dir. I am not sure how to indicate this in the %files section of the spec file ?
packaging@lists.fedoraproject.org