cmake/CheckGit.cmake uses configure_file() to create _d3version.h in ${TARGET_DIR}/lib aka ${PROJECT_BINARY_DIR}/lib. But add_custom_command() and add_custom_target() calls in the root CMakeLists.txt use ${PROJECT_BINARY_DIR}/Descent3 as path to that file, expecting it in a different place. While the build still works, since the compiler looks in the right include paths for it, the dependencies between these rules/targets are technically broken.
At least msbuild will generate warnings about missing build outputs. You can see it on CI builds before we switched to Ninja: https://github.com/DescentDevelopers/Descent3/pull/429/checks#step:6:405
Pull Request Type
Description
cmake/CheckGit.cmake uses
configure_file()
to create _d3version.h in${TARGET_DIR}/lib
aka${PROJECT_BINARY_DIR}/lib
. Butadd_custom_command()
andadd_custom_target()
calls in the root CMakeLists.txt use${PROJECT_BINARY_DIR}/Descent3
as path to that file, expecting it in a different place. While the build still works, since the compiler looks in the right include paths for it, the dependencies between these rules/targets are technically broken. At least msbuild will generate warnings about missing build outputs. You can see it on CI builds before we switched to Ninja: https://github.com/DescentDevelopers/Descent3/pull/429/checks#step:6:405Also removed the wrong
ALL
parameter fromadd_custom_command()
, it's only a valid parameter foradd_custom_target()
. See: https://github.com/DescentDevelopers/Descent3/pull/429/checks#step:6:406Related Issues
Screenshots (if applicable)
Checklist
Additional Comments