2018-08-30 18:33:07 +02:00
|
|
|
cmake_minimum_required (VERSION 3.6)
|
2018-08-30 14:03:25 +02:00
|
|
|
project (whyblocked
|
2018-08-30 18:04:56 +02:00
|
|
|
VERSION 0.6.0
|
2018-08-30 14:03:25 +02:00
|
|
|
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})
|