File: CMakeLists.txt

package info (click to toggle)
hashcheck 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 136 kB
  • sloc: cpp: 142; makefile: 3
file content (40 lines) | stat: -rw-r--r-- 1,052 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
project(hashcheck CXX)
cmake_minimum_required(VERSION 3.1)

include(GNUInstallDirs)

set(HASHCHECK_VERSION_MAJOR 1)
set(HASHCHECK_VERSION_MINOR 0)
set(HASHCHECK_VERSION_PATCH 0)

set(HASHCHECK_VERSION ${HASHCHECK_VERSION_MAJOR}.${HASHCHECK_VERSION_MINOR}.${HASHCHECK_VERSION_PATCH})

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_CXX_FLAGS "${CXX_FLAGS} -Wall")
set(CMAKE_CXX_STANDARD 11)
set(EXECUTABLE_NAME "hashcheck")

add_definitions("-DHASHCHECK_VERSION=\"${HASHCHECK_VERSION}\"")

find_package(Qt5 REQUIRED Core Widgets)

set(SOURCES
    src/main.cpp
    src/main_window.cpp
)

set(UI
    src/main_window.ui
)

qt5_wrap_ui(UI_SOURCE ${UI})
list(APPEND SOURCES ${UI_SOURCE})

add_executable(${EXECUTABLE_NAME} ${SOURCES})
qt5_use_modules(${EXECUTABLE_NAME} Core Widgets)

install(TARGETS ${EXECUTABLE_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES hashcheck.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(FILES icon.png DESTINATION ${CMAKE_INSTALL_DATADIR}/pixmaps RENAME hashcheck.png)