This PR makes various bugfixes and improvements to the project's build, allowing it to build on our Open Build Service repository.
In that repository, we have the required spec and debian files, so that semi-automated builds can be run.
Changes needed to be made in this repository so that out-of-source build would work correctly.
Change 1 - Change _PROJECT_SOURCEDIR
Previously, in CMakeLists.txt, PROJECT_SOURCE_DIR was incorrectly set using the value for CMAKE_CURRENT_BINARY_DIR. This would create issues when making out-of-source builds, because it would prevent the source files from being found correctly.
This was fixed by changing CMAKE_CURRENT_BINARY_DIR to CMAKE_CURRENT_SOURCE_DIR, where appropriate.
Change 2 - Fix call to glib-compile-resources
Previously, glib-compile-resources was not able locating the resources directory in out-of-source builds. Adding the --sourcedir=${CMAKE_CURRENT_SOURCE_DIR} argument fixed that issue.
Change 3 - Fix issues with jsoncpp
Previously, the directories for jsoncpp were not linked correctly. This should fix that. In the source code, imports to jsoncpp were modified to reflect those changes.
Change 4 - Fix narrowing conversion
The code for entries.h previously assumed that time_t is always equal to uint32_t. This is only true for certain architectures, which was leading to a build error on some systems.
Description
This PR makes various bugfixes and improvements to the project's build, allowing it to build on our Open Build Service repository.
In that repository, we have the required spec and debian files, so that semi-automated builds can be run.
Changes needed to be made in this repository so that out-of-source build would work correctly.
Change 1 - Change _PROJECT_SOURCEDIR
Previously, in
CMakeLists.txt
, PROJECT_SOURCE_DIR was incorrectly set using the value for CMAKE_CURRENT_BINARY_DIR. This would create issues when making out-of-source builds, because it would prevent the source files from being found correctly.This was fixed by changing CMAKE_CURRENT_BINARY_DIR to CMAKE_CURRENT_SOURCE_DIR, where appropriate.
Change 2 - Fix call to
glib-compile-resources
Previously,
glib-compile-resources
was not able locating theresources
directory in out-of-source builds. Adding the--sourcedir=${CMAKE_CURRENT_SOURCE_DIR}
argument fixed that issue.Change 3 - Fix issues with jsoncpp
Previously, the directories for jsoncpp were not linked correctly. This should fix that. In the source code, imports to jsoncpp were modified to reflect those changes.
Change 4 - Fix narrowing conversion
The code for
entries.h
previously assumed that time_t is always equal to uint32_t. This is only true for certain architectures, which was leading to a build error on some systems.