cmake_minimum_required (VERSION 3.7) project (whyblocked VERSION 0.6.0 LANGUAGES CXX ) include(GNUInstallDirs) find_package(PkgConfig REQUIRED) pkg_check_modules(LIBXDG_BASEDIR REQUIRED libxdg-basedir) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -g -Og") include_directories(${PROJECT_SOURCE_DIR}/src) include_directories(${PROJECT_BINARY_DIR}) include_directories(${LIBXDG_BASEDIR_INCLUDE_DIRS}) link_directories(${LIBXDG_BASEDIR_LIBRARY_DIRS}) # Write version in header configure_file ( "${PROJECT_SOURCE_DIR}/src/version.hpp.in" "${PROJECT_BINARY_DIR}/version.hpp" ) file(GLOB sources src/*.cpp) add_executable(whyblocked ${sources}) target_link_libraries(whyblocked ${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs) install(TARGETS whyblocked DESTINATION ${CMAKE_INSTALL_BINDIR})