Skip to content

Commit d2db124

Browse files
authored
Require Git only if the VCPKG_DEPENDENCY_CMAKERC option is disabled. (microsoft#1644)
1 parent b8b513b commit d2db124

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cmake/FindCMakeRC.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
option(VCPKG_DEPENDENCY_CMAKERC "CMake-based C++ resource compiler" OFF)
22

3+
if(VCPKG_DEPENDENCY_CMAKERC)
4+
find_package(CMakeRC CONFIG REQUIRED)
5+
return()
6+
endif()
7+
38
# This option exists to allow the URI to be replaced with a Microsoft-internal URI in official
49
# builds which have restricted internet access; see azure-pipelines/signing.yml
510
# Note that the SHA512 is the same, so vcpkg-tool contributors need not be concerned that we built
@@ -18,13 +23,8 @@ FetchContent_Declare(
1823
URL_HASH "SHA512=cb69ff4545065a1a89e3a966e931a58c3f07d468d88ecec8f00da9e6ce3768a41735a46fc71af56e0753926371d3ca5e7a3f2221211b4b1cf634df860c2c997f"
1924
PATCH_COMMAND "${GIT_EXECUTABLE}" apply "${CMAKE_CURRENT_LIST_DIR}/CMakeRC_cmake_4.patch"
2025
)
26+
FetchContent_MakeAvailable(CMakeRC)
2127

2228
if(NOT CMakeRC_FIND_REQUIRED)
2329
message(FATAL_ERROR "CMakeRC must be REQUIRED")
2430
endif()
25-
26-
if(VCPKG_DEPENDENCY_CMAKERC)
27-
find_package(CMakeRC CONFIG REQUIRED)
28-
else()
29-
FetchContent_MakeAvailable(CMakeRC)
30-
endif()

0 commit comments

Comments
 (0)