diff options
author | fuzzard <fuzzard@kodi.tv> | 2022-11-09 13:16:44 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2023-08-25 19:51:58 +1000 |
commit | 6302fa683e39c835f8adf1e1522579b68c5310c9 (patch) | |
tree | 98989724656cae0ddcc9ef0cc985fc777b1c2da5 /cmake/scripts/common | |
parent | d6fb1f7b8bc20f6defc53a7fdd4aa0218f9b41c7 (diff) |
[cmake] Macros.cmake refactor copy_file_to_buildtree function for early exit
Diffstat (limited to 'cmake/scripts/common')
-rw-r--r-- | cmake/scripts/common/Macros.cmake | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake index b6863960b7..f0e356ef90 100644 --- a/cmake/scripts/common/Macros.cmake +++ b/cmake/scripts/common/Macros.cmake @@ -204,6 +204,14 @@ endfunction() # Files is mirrored to the build tree and added to ${install_data} # (if NO_INSTALL is not given). function(copy_file_to_buildtree file) + # Exclude autotools build artifacts and other blacklisted files in source tree. + if(file MATCHES "(Makefile|\\.in|\\.xbt|\\.so|\\.dylib|\\.gitignore)$") + if(VERBOSE) + message(STATUS "copy_file_to_buildtree - ignoring file: ${file}") + endif() + return() + endif() + cmake_parse_arguments(arg "NO_INSTALL" "DIRECTORY;KEEP_DIR_STRUCTURE" "" ${ARGN}) if(arg_DIRECTORY) set(outdir ${arg_DIRECTORY}) @@ -230,14 +238,6 @@ function(copy_file_to_buildtree file) file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake "# Export files to build tree\n") endif() - # Exclude autotools build artefacts and other blacklisted files in source tree. - if(file MATCHES "(Makefile|\\.in|\\.xbt|\\.so|\\.dylib|\\.gitignore)$") - if(VERBOSE) - message(STATUS "copy_file_to_buildtree - ignoring file: ${file}") - endif() - return() - endif() - if(NOT file STREQUAL ${CMAKE_BINARY_DIR}/${outfile}) if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" OR NOT IS_SYMLINK "${file}") if(VERBOSE) |