From be5fd6fd03bc3f86ee8764ce33b1e10556fb5010 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Fri, 15 May 2020 21:43:41 +0100 Subject: [PATCH] Exclude directories correctly We don't need `/*` as we don't want the directory itself, not just its contents. We also need to list possible other directories explicitly as there's currently no way to skip directories without matches. It would be much nicer if CMake was tracking the DLLs we needed for us. --- CMakeLists.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e65e1debe5..41cb066e49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -508,8 +508,24 @@ if(WIN32) SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}") endif () - INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." FILES_MATCHING PATTERN "*.dll" EXCLUDE "deps/*") - INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." CONFIGURATIONS Debug;RelWithDebInfo FILES_MATCHING PATTERN "*.pdb" EXCLUDE "deps/*") + INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." FILES_MATCHING PATTERN "*.dll" + PATTERN "deps" EXCLUDE + PATTERN "apps" EXCLUDE + PATTERN "CMakeFiles" EXCLUDE + PATTERN "components" EXCLUDE + PATTERN "docs" EXCLUDE + PATTERN "extern" EXCLUDE + PATTERN "files" EXCLUDE + PATTERN "Testing" EXCLUDE) + INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." CONFIGURATIONS Debug;RelWithDebInfo FILES_MATCHING PATTERN "*.pdb" + PATTERN "deps" EXCLUDE + PATTERN "apps" EXCLUDE + PATTERN "CMakeFiles" EXCLUDE + PATTERN "components" EXCLUDE + PATTERN "docs" EXCLUDE + PATTERN "extern" EXCLUDE + PATTERN "files" EXCLUDE + PATTERN "Testing" EXCLUDE) INSTALL(FILES "${INSTALL_SOURCE}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg") INSTALL(FILES "${OpenMW_SOURCE_DIR}/CHANGELOG.md" DESTINATION "." RENAME "CHANGELOG.txt") INSTALL(FILES "${OpenMW_SOURCE_DIR}/README.md" DESTINATION "." RENAME "README.txt")