Skip to content

Commit 2c36d57

Browse files
committed
(build/images) using configure_file instead of copy
1 parent d0a7e1f commit 2c36d57

File tree

16 files changed

+54
-95
lines changed

16 files changed

+54
-95
lines changed

docs/basic/images/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@ set(PGR_WORKSHOP_IMG_SUBDIRS
99
graphs
1010
sql_function
1111
plpgsql_function
12-
)
13-
14-
#---------------------------------------------
15-
# Adding the documentation subdirectories & files
16-
#---------------------------------------------
12+
)
1713

1814
foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS})
1915
if (PGR_WORKSHOP_DEBUG)
20-
message(STATUS " -> basic/images/${dir}")
16+
message(STATUS " -> ${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
2117
endif()
2218
add_subdirectory("${dir}")
2319
if (PGR_WORKSHOP_DEBUG)
24-
message(STATUS " <- basic/images/${dir}")
20+
message(STATUS " <- ${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
2521
endif()
2622
endforeach()

docs/basic/images/data/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ set(PGR_WORKSHOP_IMG_FILES
99

1010
foreach (f ${PGR_WORKSHOP_IMG_FILES})
1111
if (PGR_WORKSHOP_VERBOSE_DEBUG)
12-
message(STATUS " Adding file ${f}")
12+
message(STATUS " -> ${f}")
1313
endif()
14-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
14+
configure_file(${f} ${f} COPYONLY)
1515
endforeach()
16-

docs/basic/images/pedestrian/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ set(PGR_WORKSHOP_IMG_FILES
1313

1414
foreach (f ${PGR_WORKSHOP_IMG_FILES})
1515
if (PGR_WORKSHOP_VERBOSE_DEBUG)
16-
message(STATUS " Adding file ${f}")
16+
message(STATUS " -> ${f}")
1717
endif()
18-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
18+
configure_file(${f} ${f} COPYONLY)
1919
endforeach()
20-

docs/basic/images/plpgsql_function/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ set(PGR_WORKSHOP_IMG_FILES
1313

1414
foreach (f ${PGR_WORKSHOP_IMG_FILES})
1515
if (PGR_WORKSHOP_VERBOSE_DEBUG)
16-
message(STATUS " Adding file ${f}")
16+
message(STATUS " -> ${f}")
1717
endif()
18-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
18+
configure_file(${f} ${f} COPYONLY)
1919
endforeach()
20-

docs/basic/images/sql_function/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ set(PGR_WORKSHOP_IMG_FILES
1414

1515
foreach (f ${PGR_WORKSHOP_IMG_FILES})
1616
if (PGR_WORKSHOP_VERBOSE_DEBUG)
17-
message(STATUS " Adding file ${f}")
17+
message(STATUS " -> ${f}")
1818
endif()
19-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
19+
configure_file(${f} ${f} COPYONLY)
2020
endforeach()
21-

docs/images/CMakeLists.txt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ set(PGR_WORKSHOP_IMG_SUBDIRS
77
osgeolive
88
)
99

10-
11-
#---------------------------------------------
12-
# Adding the documentation subdirectories & files
13-
#---------------------------------------------
14-
1510
foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS})
16-
add_subdirectory(${dir})
1711
if (PGR_WORKSHOP_DEBUG)
18-
message(STATUS " Adding images directory ${dir}")
12+
message(STATUS " -> ${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
13+
endif()
14+
add_subdirectory("${dir}")
15+
if (PGR_WORKSHOP_DEBUG)
16+
message(STATUS " <- ${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
1917
endif()
2018
endforeach()
2119

@@ -29,8 +27,7 @@ set(PGR_WORKSHOP_IMG_FILES
2927

3028
foreach (f ${PGR_WORKSHOP_IMG_FILES})
3129
if (PGR_WORKSHOP_VERBOSE_DEBUG)
32-
message(STATUS " Adding file ${f}")
30+
message(STATUS " -> ${f}")
3331
endif()
34-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
32+
configure_file(${f} ${f} COPYONLY)
3533
endforeach()
36-

docs/images/introduction/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ set(PGR_WORKSHOP_IMG_FILES
99

1010
foreach (f ${PGR_WORKSHOP_IMG_FILES})
1111
if (PGR_WORKSHOP_VERBOSE_DEBUG)
12-
message(STATUS " Adding file ${f}")
12+
message(STATUS " -> ${f}")
1313
endif()
14-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
14+
configure_file(${f} ${f} COPYONLY)
1515
endforeach()
16-

docs/images/logos/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ set(PGR_WORKSHOP_IMG_FILES
1616

1717

1818
foreach (f ${PGR_WORKSHOP_IMG_FILES})
19-
if (PGR_WORKSHOP_VERBOSE_DEBUG)
20-
message(STATUS " Adding image ${f}")
21-
endif()
22-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
19+
if (PGR_WORKSHOP_VERBOSE_DEBUG)
20+
message(STATUS " -> ${f}")
21+
endif()
22+
configure_file(${f} ${f} COPYONLY)
2323
endforeach()
24-

docs/images/osgeolive/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ set(PGR_WORKSHOP_IMG_FILES
2121

2222

2323
foreach (f ${PGR_WORKSHOP_IMG_FILES})
24-
if (PGR_WORKSHOP_VERBOSE_DEBUG)
25-
message(STATUS " Adding file ${f}")
26-
endif()
27-
FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
24+
if (PGR_WORKSHOP_VERBOSE_DEBUG)
25+
message(STATUS " -> ${f}")
26+
endif()
27+
configure_file(${f} ${f} COPYONLY)
2828
endforeach()
29-

docs/interactions/images/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
#---------------------
55
set(PGR_WORKSHOP_IMG_SUBDIRS
66
chap_QGIS
7-
chapter9
8-
)
9-
10-
7+
)
118

129
#---------------------------------------------
1310
# Adding the documentation subdirectories & files
1411
#---------------------------------------------
1512

1613
foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS})
17-
file(COPY "${dir}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
1814
if (PGR_WORKSHOP_DEBUG)
19-
message(STATUS " Adding images directory ${dir}")
15+
message(STATUS " -> ${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
16+
endif()
17+
add_subdirectory("${dir}")
18+
if (PGR_WORKSHOP_DEBUG)
19+
message(STATUS " <- ${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
2020
endif()
2121
endforeach()

0 commit comments

Comments
 (0)