-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
57 lines (44 loc) · 1.38 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
cmake_minimum_required(VERSION 2.6)
project(wolken-gallery)
set(CMAKE_INSTALL_PREFIX /usr)
set(GALLERY_DIR share/wolken-gallery/gal)
# Register all files
file(GLOB _a src/*.php)
file(GLOB _b src/backend/*.php)
file(GLOB _c src/css/*.css)
file(GLOB _d src/img/*.*)
file(GLOB _e src/img/cal/*.*)
file(GLOB _f src/inc/*.*)
file(GLOB _g src/js/*.*)
# Install all files
foreach(a ${_a})
install(FILES ${a} DESTINATION ${GALLERY_DIR})
endforeach()
foreach(b ${_b})
install(FILES ${b} DESTINATION ${GALLERY_DIR}/backend)
endforeach()
foreach(c ${_c})
install(FILES ${c} DESTINATION ${GALLERY_DIR}/css)
endforeach()
foreach(d ${_d})
install(FILES ${d} DESTINATION ${GALLERY_DIR}/img)
endforeach()
foreach(e ${_e})
install(FILES ${e} DESTINATION ${GALLERY_DIR}/img/cal)
endforeach()
foreach(f ${_f})
install(FILES ${f} DESTINATION ${GALLERY_DIR}/inc)
endforeach()
foreach(g ${_g})
install(FILES ${g} DESTINATION ${GALLERY_DIR}/js)
endforeach()
# Install Apache2 configuration file
set(APACHE2_CONF conf/apache.conf)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${APACHE2_CONF} DESTINATION /etc/wolken-gallery)
# Uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)