From a662ba767a6444b76b0394eb60380eee3e839db7 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 14 Dec 2016 02:24:46 +0100 Subject: Sync with Krypton branch --- project/cmake/scripts/common/HandleDepends.cmake | 43 +++--------------------- 1 file changed, 5 insertions(+), 38 deletions(-) (limited to 'project/cmake/scripts/common/HandleDepends.cmake') diff --git a/project/cmake/scripts/common/HandleDepends.cmake b/project/cmake/scripts/common/HandleDepends.cmake index adc105b..880ccdf 100644 --- a/project/cmake/scripts/common/HandleDepends.cmake +++ b/project/cmake/scripts/common/HandleDepends.cmake @@ -17,7 +17,6 @@ function(add_addon_depends addon searchpath) file MATCHES noinstall.txt OR file MATCHES flags.txt OR file MATCHES deps.txt OR - file MATCHES "[a-z]+-deps[.]txt" OR file MATCHES platforms.txt)) message(STATUS "Processing ${file}") file(STRINGS ${file} def) @@ -50,11 +49,7 @@ function(add_addon_depends addon searchpath) if(EXISTS ${dir}/flags.txt) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/flags.txt) file(STRINGS ${dir}/flags.txt extraflags) - - # replace some custom placeholders - string(REPLACE "@MINGW_TOOLCHAIN_FILE@" "${OUTPUT_DIR}/Toolchain_mingw32.cmake" extraflags "${extraflags}") string(REPLACE " " ";" extraflags ${extraflags}) - message(STATUS "${id} extraflags: ${extraflags}") endif() @@ -108,18 +103,11 @@ function(add_addon_depends addon searchpath) endif() endif() + # on windows "patch.exe" can only handle CR-LF line-endings so we + # need to force it to also handle LF-only line endings set(PATCH_PROGRAM ${PATCH_EXECUTABLE}) - - # On Windows "patch.exe" can only handle CR-LF line-endings. - # Our patches have LF-only line endings - except when they - # have been checked out as part of a dependency hosted on Git - # and core.autocrlf=true. if(WIN32) - file(READ ${patch} patch_content_hex HEX) - # Force handle LF-only line endings - if(NOT patch_content_hex MATCHES "0d0a") - set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary") - endif() + set(PATCH_PROGRAM "\"${PATCH_PROGRAM}\" --binary") endif() endif() @@ -143,11 +131,8 @@ function(add_addon_depends addon searchpath) set(INSTALL_COMMAND INSTALL_COMMAND "") endif() - # check if there's a platform-specific or generic deps.txt containing dependencies on other libraries - if(EXISTS ${dir}/${CORE_SYSTEM_NAME}-deps.txt) - file(STRINGS ${dir}/${CORE_SYSTEM_NAME}-deps.txt deps) - message(STATUS "${id} depends: ${deps}") - elseif(EXISTS ${dir}/deps.txt) + # check if there's a deps.txt containing dependencies on other libraries + if(EXISTS ${dir}/deps.txt) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/deps.txt) file(STRINGS ${dir}/deps.txt deps) message(STATUS "${id} depends: ${deps}") @@ -176,10 +161,6 @@ function(add_addon_depends addon searchpath) PATCH_COMMAND ${PATCH_COMMAND} "${INSTALL_COMMAND}") - if(CMAKE_VERSION VERSION_GREATER 3.5.9) - list(APPEND EXTERNALPROJECT_SETUP GIT_SHALLOW 1) - endif() - # if there's an url defined we need to pass that to externalproject_add() if(DEFINED url AND NOT "${url}" STREQUAL "") # check if there's a third parameter in the file @@ -191,20 +172,6 @@ function(add_addon_depends addon searchpath) GIT_REPOSITORY ${url} GIT_TAG ${revision} "${EXTERNALPROJECT_SETUP}") - - # For patchfiles to work, disable (users globally set) autocrlf=true - if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_GREATER 3.7) - message(AUTHOR_WARNING "Make use of GIT_CONFIG") - endif() - if(WIN32 AND patches) - externalproject_add_step(${id} gitconfig - COMMAND git config core.autocrlf false - COMMAND git rm -rf --cached . - COMMAND git reset --hard HEAD - COMMENT "Performing gitconfig step: Disabling autocrlf to enable patching for '${id}'" - DEPENDERS patch - WORKING_DIRECTORY ) - endif() else() set(CONFIGURE_COMMAND "") if(NOT WIN32) -- cgit v1.2.3