Bug 439166

Summary: CMake fails to detect craft-provided svn on Windows
Product: [Developer tools] Craft Reporter: Dawid Wróbel <me>
Component: BlueprintsAssignee: Hannah von Reth <vonreth>
Status: RESOLVED FIXED    
Severity: normal CC: bcooksley, kde-windows
Priority: NOR    
Version: stable   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:

Description Dawid Wróbel 2021-06-25 20:47:18 UTC
SUMMARY
Despite adding self.buildDependencies["dev-utils/subversion"] to the blueprint, CMake's FindSubversion fails to detect the svn.exe executable. This is because the blueprint itself provides svn as a batch file (svn.bat) by copying it to dev-utils\bin\svn.bat, however, the FindSubversion macro looks for svn|svn.com|svn.exe, but not svn.bat 

STEPS TO REPRODUCE
1. Create CMakeLists.txt with following content:
cmake_minimum_required(VERSION 3.19)
project(FindPackageTest)

find_package(Subversion 1.4 REQUIRED)
2. run using 
cmake -D CMAKE_FIND_DEBUG_MODE=ON .

OBSERVED RESULT
Could NOT find Subversion (missing: Subversion_SVN_EXECUTABLE) (Required is at least version "1.4")

EXPECTED RESULT
Svn should be found
Comment 1 Ben Cooksley 2021-06-25 20:49:10 UTC
The easiest fix here I suspect would be to replace svn.bat with a kshim based svn.exe?

(Note: I worked around this limitation in the Krita builds, as we use Craft to supply SVN there too)