Have just got up-to-date version of Skanlite sources from Github page: https://github.com/KDE/skanlite Then tried cmake CMakeLists.cmake && make all And got following error messages: [ 9%] Automatic moc for target skanlite [ 9%] Built target skanlite_automoc Scanning dependencies of target skanlite [ 18%] Building CXX object src/CMakeFiles/skanlite.dir/main.cpp.o In file included from /home/truf/dev/skanlite/src/main.cpp:33:0: /home/truf/dev/skanlite/src/version.h:1:3: error: invalid preprocessing directive #This # This is a basic version file for the Config-mode of find_package(). ... It seems that CMakeLists.cmake contains error. Looks like skanlite generates version.h from version.h.cmake with help of configure_file(). But before that it calls ecm_setup_version() which overwrites version.h.cmake template with package version file. Then nothing works. I don't understand why package version file is created on top of version file and how it's supposed to be used. To be able to build the sources I had to comment ecm_setup_version() invocation in CMakeLists.cmake before calling cmake first time.
It works if cmake is called from subfolder like: mkdir build cd build cmake .. make And doesn't work if only executed from project's root folder.