-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (42 loc) · 1.49 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
cmake_minimum_required (VERSION 3.13)
project(llog)
set(SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME})
set(DESKTOP_FILE_DIR ${CMAKE_INSTALL_PREFIX}/share/applications)
set(ICONS_FILE_DIR ${CMAKE_INSTALL_PREFIX}/share/icons)
set(DB_FILE_NAME llog.sql)
set(DB_FILE_PATH ${SHARE_DIR}/${DB_FILE_NAME})
set(SUMMITS_DB_FILE_NAME summitslist.sqlite)
set(SUMMITS_DB_FILE_PATH ${SHARE_DIR}/${SUMMITS_DB_FILE_NAME})
set(SOTA_DB_PATH ${CMAKE_SOURCE_DIR}/sota_db)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/${SUMMITS_DB_FILE_NAME}
COMMAND python3 ${SOTA_DB_PATH}/summits_to_db.py
)
add_custom_target(generate_summits_db ALL DEPENDS ${PROJECT_BINARY_DIR}/${SUMMITS_DB_FILE_NAME})
add_subdirectory(src)
install (FILES db/create_llog.sh
DESTINATION bin
COMPONENT bin
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_READ WORLD_EXECUTE)
install (FILES gui/llog.png db/${DB_FILE_NAME}
DESTINATION ${SHARE_DIR}
COMPONENT config
PERMISSIONS OWNER_WRITE OWNER_READ
GROUP_READ WORLD_READ)
install(FILES ${PROJECT_BINARY_DIR}/${SUMMITS_DB_FILE_NAME}
DESTINATION ${SHARE_DIR}
COMPONENT config
PERMISSIONS OWNER_WRITE OWNER_READ
GROUP_READ WORLD_READ)
install (FILES gui/llog.desktop
DESTINATION ${DESKTOP_FILE_DIR}
COMPONENT config
PERMISSIONS OWNER_WRITE OWNER_READ
GROUP_READ WORLD_READ)
install (FILES gui/llog.png
DESTINATION ${ICONS_FILE_DIR}
COMPONENT config
PERMISSIONS OWNER_WRITE OWNER_READ
GROUP_READ WORLD_READ)