Bug 439166 - CMake fails to detect craft-provided svn on Windows
Summary: CMake fails to detect craft-provided svn on Windows
Status: RESOLVED FIXED
Alias: None
Product: Craft
Classification: Developer tools
Component: Blueprints (show other bugs)
Version: stable
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-25 20:47 UTC by Dawid Wróbel
Modified: 2021-06-26 18:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)