find_package: Fix system package registry test path conversion
Do not use file(TO_NATIVE_PATH) to compute the value to store in the registry. It is meant for constructing values to be put in shells. Since find_package() can use the value with CMake-normalized slashes do not bother with any conversion.
This commit is contained in:
parent
93021adb73
commit
08b93977cf
|
@ -42,7 +42,7 @@ FIND_PACKAGE(VersionTestD 1.2.3.4)
|
||||||
SET(CMakeTestSystemPackage "")
|
SET(CMakeTestSystemPackage "")
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
IF(WIN32 AND NOT CYGWIN)
|
||||||
# Try writing a value to the system package registry.
|
# Try writing a value to the system package registry.
|
||||||
FILE(TO_NATIVE_PATH "${FindPackageTest_SOURCE_DIR}/SystemPackage" _data)
|
SET(_data "${FindPackageTest_SOURCE_DIR}/SystemPackage")
|
||||||
SET(_key "HKLM\\Software\\Kitware\\CMake\\Packages\\CMakeTestSystemPackage")
|
SET(_key "HKLM\\Software\\Kitware\\CMake\\Packages\\CMakeTestSystemPackage")
|
||||||
SET(_file "${FindPackageTest_BINARY_DIR}/CMakeTestSystemPackage.data")
|
SET(_file "${FindPackageTest_BINARY_DIR}/CMakeTestSystemPackage.data")
|
||||||
FILE(WRITE ${_file} "${_data}\n")
|
FILE(WRITE ${_file} "${_data}\n")
|
||||||
|
|
Loading…
Reference in New Issue