Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CMakeLists.txt: do not install .gitignore files

Prevents two .gitignore files from being installed:
  * Fixed the list(REMOVE_ITEM...) macro not actually removing the
    .gitignore file from the list. The list contains full paths to
    files, thus we need the full path to .gitignore as well, which
    requires a file(GLOB...);
  * Fixed install(DIRECTORY...) to add a PATTERN match removing the
    .gitignore file.

Signed-off-by: Timothée Ravier <tim@siosm.fr>
  • Loading branch information...
commit 38843a88c7ab8e9e37602668db667e59aa9d9edb 1 parent 5ef9825
@Siosm Siosm authored mupuf committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 CMakeLists.txt
View
8 CMakeLists.txt
@@ -23,12 +23,14 @@ add_subdirectory(vdpow)
add_subdirectory(nvhw)
add_subdirectory(hwtest)
-# Get the proper list of hwdoc files (without .gitignore)
+# Get the list of hwdoc files to install them in a flat directory
file(GLOB_RECURSE HWDOCS_SRC hwdocs/*)
-list(REMOVE_ITEM HWDOCS_SRC ".gitignore")
+# Get the full patch to .gitignore and remove it from the list
+file(GLOB GITIGNORE hwdocs/.gitignore)
+list(REMOVE_ITEM HWDOCS_SRC ${GITIGNORE})
install(DIRECTORY include/ DESTINATION include/envytools)
-install(DIRECTORY rnndb DESTINATION share)
+install(DIRECTORY rnndb DESTINATION share PATTERN ".gitignore" EXCLUDE)
install(FILES ${HWDOCS_SRC} DESTINATION ${DOC_PATH}/hwdocs)
install(FILES README DESTINATION ${DOC_PATH})
Please sign in to comment.
Something went wrong with that request. Please try again.