forked from linuxdeepin/dde-file-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_dconfig.cmake
22 lines (21 loc) · 989 Bytes
/
install_dconfig.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# expect that all dconfigs of plugin is saved in ./assets/configs
function(INSTALL_DCONFIG CONFIG_NAME)
set(DConfigPath ${CMAKE_SOURCE_DIR}/assets/configs)
message("DConfigPath: ${DConfigPath}")
set(DFMAppId "org.deepin.dde.file-manager")
set(ConfigName ${CONFIG_NAME})
if (DEFINED DSG_DATA_DIR)
message("-- DConfig is supported by DTK")
message("---- AppId: ${DFMAppId}")
message("---- Base: ${DConfigPath}")
message("---- Files: ${DConfigPath}/${ConfigName}")
dconfig_meta_files(APPID ${DFMAppId}
BASE ${DConfigPath}
FILES ${DConfigPath}/${ConfigName})
else()
set(DSG_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/dsg)
message("-- DConfig is NOT supported by DTK, install files into target path")
message("---- InstallTargetDir: ${DSG_DATA_DIR}/configs")
install(FILES ${DConfigPath}/${ConfigName} DESTINATION ${DSG_DATA_DIR}/configs/${DFMAppId})
endif()
endfunction()