-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
66 lines (50 loc) · 1.17 KB
/
CMakeLists.txt
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required (VERSION 3.1)
# CMake include path
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
project(gonepass)
SET( PKGDATADIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR} )
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0)
find_package(OpenSSL REQUIRED)
set (CMAKE_CXX_STANDARD 11)
# GResource
include(GResource)
gresource(${CMAKE_CURRENT_SOURCE_DIR} gonepass.gresource.xml
${CMAKE_BINARY_DIR} RESOURCE_FILE)
include_directories (${GTKMM_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
link_directories (${GTKMM_LIBRARY_DIRS})
set (SOURCES
main.cpp
keychain.cpp
totp.cpp
${RESOURCE_FILE}
)
set (HEADERS
gonepass.h
)
add_executable(gonepass
${SOURCES}
)
target_link_libraries(gonepass
${GTKMM_LIBRARIES}
${OPENSSL_LIBRARIES}
)
install (TARGETS gonepass DESTINATION bin)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/gonepass.desktop.in
${CMAKE_BINARY_DIR}/gonepass.desktop
)
install (
FILES
${CMAKE_BINARY_DIR}/gonepass.desktop
DESTINATION
share/applications
)
install (
FILES
gonepass-icon.png
DESTINATION
share/pixmaps
RENAME
gonepass.png
)