-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply orc patch in order to make CMake happy
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake | ||
index aa520ff..1acdbd0 100644 | ||
--- a/cmake_modules/ThirdpartyToolchain.cmake | ||
+++ b/cmake_modules/ThirdpartyToolchain.cmake | ||
@@ -464,8 +464,10 @@ add_library (orc::protoc ALIAS orc_protoc) | ||
|
||
if (ORC_PACKAGE_KIND STREQUAL "conan") | ||
target_link_libraries (orc_protobuf INTERFACE ${protobuf_LIBRARIES}) | ||
-elseif (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOBUF_STATIC_LIB}) | ||
- target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB}) | ||
+elseif (ORC_PREFER_STATIC_PROTOBUF) | ||
+ if (${PROTOBUF_STATIC_LIB}) | ||
+ target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_STATIC_LIB}) | ||
+ endif() | ||
else () | ||
target_link_libraries (orc_protobuf INTERFACE ${PROTOBUF_LIBRARY}) | ||
endif() | ||
@@ -476,8 +478,10 @@ else () | ||
endif () | ||
|
||
if (NOT ORC_PACKAGE_KIND STREQUAL "conan") | ||
- if (ORC_PREFER_STATIC_PROTOBUF AND ${PROTOC_STATIC_LIB}) | ||
- target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB}) | ||
+ if (${ORC_PREFER_STATIC_PROTOBUF}) | ||
+ if (${PROTOC_STATIC_LIB}) | ||
+ target_link_libraries (orc_protoc INTERFACE ${PROTOC_STATIC_LIB}) | ||
+ endif() | ||
else () | ||
target_link_libraries (orc_protoc INTERFACE ${PROTOC_LIBRARY}) | ||
endif() |