-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12301 from mkruskal-google/cmake-fix
Only include utf8_range if it hasn't been included already
- Loading branch information
Showing
3 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
set(utf8_range_ENABLE_TESTS OFF CACHE BOOL "Disable utf8_range tests") | ||
if (NOT TARGET utf8_range) | ||
set(utf8_range_ENABLE_TESTS OFF CACHE BOOL "Disable utf8_range tests") | ||
|
||
if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/utf8_range/CMakeLists.txt") | ||
message(FATAL_ERROR | ||
"Cannot find third_party/utf8_range directory that's needed for " | ||
"the protobuf runtime.\n") | ||
endif() | ||
if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/utf8_range/CMakeLists.txt") | ||
message(FATAL_ERROR | ||
"Cannot find third_party/utf8_range directory that's needed for " | ||
"the protobuf runtime.\n") | ||
endif() | ||
|
||
set(utf8_range_ENABLE_INSTALL ${protobuf_INSTALL} CACHE BOOL "Set install") | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range third_party/utf8_range) | ||
set(utf8_range_ENABLE_INSTALL ${protobuf_INSTALL} CACHE BOOL "Set install") | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range third_party/utf8_range) | ||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range) | ||
endif () | ||
|
||
set(_protobuf_FIND_UTF8_RANGE "if(NOT TARGET utf8_range)\n find_package(utf8_range CONFIG)\nendif()") |