Describe the bug
In configure_file("${PROJECT_SOURCE_DIR}/version.in" "${PROJECT_BINARY_DIR}/version" NEWLINE_STYLE UNIX), the variable JSONCPP_VERSION used in the template header is not set. This causes the version file in the binary directory to be empty.
CMake Warning (dev) at src/CDK/CORELIB/MAIN/3rdparty/jsoncpp/CMakeLists.txt:100 (configure_file):
uninitialized variable 'JSONCPP_VERSION'
You probably meant to use the jsoncpp_VERSION variable in version.in.
To Reproduce
Steps to reproduce the behavior:
- Configure project with CMake. Use
--warn-uninitialized to see the warning.
Expected behavior
The correct variable is used and the project version is written to the version file.