Merge lp:~midori/midori/confucious into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6413
Merged at revision: 6416
Proposed branch: lp:~midori/midori/confucious
Merge into: lp:midori
Diff against target: 37 lines (+22/-0)
2 files modified
CMakeLists.txt (+1/-0)
config/CMakeLists.txt (+21/-0)
To merge this branch: bzr merge lp:~midori/midori/confucious
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+187920@code.launchpad.net

Commit message

Add CMakeLists.txt for config directory

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-09-22 14:40:37 +0000
3+++ CMakeLists.txt 2013-09-26 21:40:52 +0000
4@@ -236,6 +236,7 @@
5 add_subdirectory (po)
6 add_subdirectory (icons)
7 add_subdirectory (data)
8+add_subdirectory (config)
9 enable_testing()
10 add_subdirectory (tests)
11 add_subdirectory (extensions)
12
13=== added file 'config/CMakeLists.txt'
14--- config/CMakeLists.txt 1970-01-01 00:00:00 +0000
15+++ config/CMakeLists.txt 2013-09-26 21:40:52 +0000
16@@ -0,0 +1,21 @@
17+# Copyright (C) 2013 Olivier Duchateau
18+
19+set (SYSCONFDIR ${CMAKE_INSTALL_FULL_SYSCONFDIR})
20+set (XDG_CONFIG_DIR "xdg/${CMAKE_PROJECT_NAME}")
21+
22+file (GLOB_RECURSE CONFIG_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
23+list (REMOVE_ITEM CONFIG_FILES "CMakeLists.txt")
24+
25+foreach (FILE ${CONFIG_FILES})
26+ string (FIND ${FILE} "adblock" ADBLOCK_CONF)
27+ if (ADBLOCK_CONF GREATER -1)
28+ string (REPLACE "config" "" dirname ${FILE})
29+ install (FILES ${FILE}
30+ DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/${XDG_CONFIG_DIR}/${dirname}")
31+ message("${CMAKE_PROJECT_NAME}")
32+ else ()
33+ install (FILES ${FILE}
34+ DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/${XDG_CONFIG_DIR}")
35+ message("${FILE}")
36+ endif ()
37+endforeach ()

Subscribers

People subscribed via source and target branches

to all changes: