Skip to content

Instantly share code, notes, and snippets.

@FlorianFranzen
Created November 2, 2015 11:10
Show Gist options
  • Save FlorianFranzen/bebf7aab0469a76a948f to your computer and use it in GitHub Desktop.
Save FlorianFranzen/bebf7aab0469a76a948f to your computer and use it in GitHub Desktop.
diff --git matlab/CMakeLists.txt matlab/CMakeLists.txt
index 81dfc6c..63dc533 100644
--- matlab/CMakeLists.txt
+++ matlab/CMakeLists.txt
@@ -8,17 +8,10 @@ install(FILES ${mfiles} DESTINATION local/matlab)
# Create and install man pages
set(docbooks spots2pos.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git scripts/CMakeLists.txt scripts/CMakeLists.txt
index a643bac..1a023f0 100644
--- scripts/CMakeLists.txt
+++ scripts/CMakeLists.txt
@@ -45,17 +45,10 @@ set(docbooks
pad.docbook
process_reorderclusters.docbook
rn.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process/CMakeLists.txt src/process/CMakeLists.txt
index 7e3c048..5c50d74 100644
--- src/process/CMakeLists.txt
+++ src/process/CMakeLists.txt
@@ -4,17 +4,10 @@ set(program process)
# Create and install man pages
set(docbooks process.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_extractchannels/CMakeLists.txt src/process_extractchannels/CMakeLists.txt
index 140f3a0..6fc0a2c 100644
--- src/process_extractchannels/CMakeLists.txt
+++ src/process_extractchannels/CMakeLists.txt
@@ -10,17 +10,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(man man-${program})
set(docbooks process_extractchannels.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_extractleds/CMakeLists.txt src/process_extractleds/CMakeLists.txt
index dc4cc40..7fd9f20 100644
--- src/process_extractleds/CMakeLists.txt
+++ src/process_extractleds/CMakeLists.txt
@@ -13,17 +13,10 @@ install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${program}" DESTINATION bin)
# Create and install man pages
set(docbooks process_extractleds.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_extractspikes/CMakeLists.txt src/process_extractspikes/CMakeLists.txt
index cefce1f..3f09bb3 100644
--- src/process_extractspikes/CMakeLists.txt
+++ src/process_extractspikes/CMakeLists.txt
@@ -9,17 +9,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_extractspikes.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_medianfilter/CMakeLists.txt src/process_medianfilter/CMakeLists.txt
index bfc3b28..4e215a8 100644
--- src/process_medianfilter/CMakeLists.txt
+++ src/process_medianfilter/CMakeLists.txt
@@ -9,17 +9,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_medianfilter.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_medianthreshold/CMakeLists.txt src/process_medianthreshold/CMakeLists.txt
index 9f7080e..4841f7a 100644
--- src/process_medianthreshold/CMakeLists.txt
+++ src/process_medianthreshold/CMakeLists.txt
@@ -9,17 +9,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_medianthreshold.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_merge/CMakeLists.txt src/process_merge/CMakeLists.txt
index 00351a2..6ac3862 100644
--- src/process_merge/CMakeLists.txt
+++ src/process_merge/CMakeLists.txt
@@ -9,17 +9,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_merge.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_nlxconvert/CMakeLists.txt src/process_nlxconvert/CMakeLists.txt
index 66a9b62..c0b2e75 100644
--- src/process_nlxconvert/CMakeLists.txt
+++ src/process_nlxconvert/CMakeLists.txt
@@ -20,17 +20,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_nlxconvert.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_pca/CMakeLists.txt src/process_pca/CMakeLists.txt
index d1f0c4f..835c2b8 100644
--- src/process_pca/CMakeLists.txt
+++ src/process_pca/CMakeLists.txt
@@ -10,17 +10,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_pca.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_removeartefacts/CMakeLists.txt src/process_removeartefacts/CMakeLists.txt
index 483feb5..2659640 100644
--- src/process_removeartefacts/CMakeLists.txt
+++ src/process_removeartefacts/CMakeLists.txt
@@ -9,17 +9,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_removeartefacts.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_resample/CMakeLists.txt src/process_resample/CMakeLists.txt
index 7b25204..3386791 100644
--- src/process_resample/CMakeLists.txt
+++ src/process_resample/CMakeLists.txt
@@ -17,17 +17,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_resample.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/process_smrconvert/CMakeLists.txt src/process_smrconvert/CMakeLists.txt
index 2119114..2a61d3b 100644
--- src/process_smrconvert/CMakeLists.txt
+++ src/process_smrconvert/CMakeLists.txt
@@ -20,17 +20,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks process_smrconvert.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
diff --git src/xpathReader/CMakeLists.txt src/xpathReader/CMakeLists.txt
index 5b1b87e..04ffde1 100644
--- src/xpathReader/CMakeLists.txt
+++ src/xpathReader/CMakeLists.txt
@@ -12,17 +12,10 @@ install(TARGETS ${program} DESTINATION bin)
# Create and install man pages
set(docbooks xpathReader.docbook)
-file(GLOB_RECURSE files /usr/share/docbook.xsl)
-foreach(file ${files})
- string(FIND ${file} manpages found)
- if (NOT found EQUAL -1)
- set(xsl ${file})
- endif()
-endforeach()
set(manpages)
foreach(docbook ${docbooks})
string(REGEX REPLACE docbook 1 manpage ${docbook})
- add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc ${xsl} "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
+ add_custom_command(OUTPUT ${manpage} DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}" COMMAND xsltproc "${CMAKE_CURRENT_SOURCE_DIR}/${docbook}")
add_custom_command(OUTPUT ${manpage}.gz DEPENDS ${manpage} COMMAND gzip -f ${manpage})
list(APPEND manpages ${manpage}.gz)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${manpage}.gz" DESTINATION man/man1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment