TheBrokenRail
0a99c6d815
All checks were successful
FeedbackD-Configuration/pipeline/head This commit looks good
47 lines
1.5 KiB
CMake
47 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.1.0)
|
|
|
|
project(feedbackd-configuration)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0)
|
|
pkg_check_modules(LIBHANDY REQUIRED IMPORTED_TARGET libhandy-1)
|
|
pkg_check_modules(JSON_GLIB REQUIRED IMPORTED_TARGET json-glib-1.0)
|
|
|
|
link_libraries(PkgConfig::GTK3 PkgConfig::LIBHANDY PkgConfig::JSON_GLIB)
|
|
|
|
add_compile_options(-Wall -Wextra -Werror)
|
|
|
|
add_custom_command(
|
|
OUTPUT "${CMAKE_BINARY_DIR}/.gresource.c" non-existent.c
|
|
COMMAND glib-compile-resources
|
|
ARGS --target "${CMAKE_BINARY_DIR}/.gresource.c" --generate-source --sourcedir "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/.gresource.xml"
|
|
)
|
|
|
|
function(add_debug_flag x)
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
add_compile_options("${x}")
|
|
add_link_options("${x}")
|
|
endif()
|
|
endfunction()
|
|
|
|
add_debug_flag("-fno-omit-frame-pointer;-fsanitize=address")
|
|
|
|
add_executable(feedbackd-configuration "${CMAKE_BINARY_DIR}/.gresource.c" src/main.c src/dialog.c src/util.c)
|
|
|
|
install(TARGETS feedbackd-configuration)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
install(FILES "data/com.thebrokenrail.FeedbackD-Configuration.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
|
install(FILES "data/com.thebrokenrail.FeedbackD-Configuration.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/96x96/apps")
|
|
|
|
set(CPACK_PACKAGE_VENDOR "TheBrokenRail")
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR 1)
|
|
set(CPACK_PACKAGE_VERSION_MINOR 0)
|
|
set(CPACK_PACKAGE_VERSION_PATCH 0)
|
|
|
|
set(CPACK_GENERATOR "TGZ")
|
|
|
|
include(CPack) |