I've seen this quite a lot in C++, that developers add an empty source file to the library in CMake. One example is here, with the empty source file found here. The CMake file has this line:
# build the library
add_library(${PROJECT_NAME} STATIC src/dependency-tracker.cc)
This is only the case if there are no other source files in the src folder, so the library would be 'header only'. Why do they do this?
The directory structure i was referring to:
.
├── CMakeLists.txt
├── include
│ └── okvis
│ └── kinematics
│ ├── implementation
│ │ └── Transformation.hpp <- header only implementation
│ ├── operators.hpp
│ └── Transformation.hpp
├── src
│ └── dependency-tracker.cc <- empty source file
└── test
├── runTests.cpp
└── TestTransformation.cpp