aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs
diff options
context:
space:
mode:
authorsvidyuk <svidyuk@yandex-team.com>2024-04-05 07:07:56 +0300
committersvidyuk <svidyuk@yandex-team.com>2024-04-05 07:17:50 +0300
commit6484550aa9842e870619262b6ff32e2e35820210 (patch)
tree014cf2c50eb53eb5365a51ee0a0b61cc02ed9afe /contrib/libs
parent72c0e2fa8054597e8e76a0c1dd60e5539a4278fe (diff)
downloadydb-6484550aa9842e870619262b6ff32e2e35820210.tar.gz
Do not drop adincls in ya make opensource build because of cmake export replacements
a118aa391374ee757d795d5237e28fb8cf1e74fe
Diffstat (limited to 'contrib/libs')
-rw-r--r--contrib/libs/linux-headers/ya.make22
-rw-r--r--contrib/libs/openssl/crypto/ya.make14
-rw-r--r--contrib/libs/openssl/ya.make19
-rw-r--r--contrib/libs/protobuf/ya.make24
-rw-r--r--contrib/libs/protoc/ya.make20
5 files changed, 69 insertions, 30 deletions
diff --git a/contrib/libs/linux-headers/ya.make b/contrib/libs/linux-headers/ya.make
index dcaf1a8101..7a7d74a66a 100644
--- a/contrib/libs/linux-headers/ya.make
+++ b/contrib/libs/linux-headers/ya.make
@@ -30,15 +30,27 @@ VERSION(6.5.9)
ORIGINAL_SOURCE(mirror://kernel/linux/kernel/v6.x/linux-6.5.9.tar.xz)
+IF (OPENSOURCE_REPLACE_LINUX_HEADERS AND EXPORT_CMAKE)
+
+ OPENSOURCE_EXPORT_REPLACEMENT(
+ CMAKE linux-headers-generic
+ CMAKE_TARGET linux-headers-generic::linux-headers-generic
+ CONAN linux-headers-generic/${OPENSOURCE_REPLACE_LINUX_HEADERS}
+ )
+
+ELSE()
+
+ ADDINCL(
+ GLOBAL contrib/libs/linux-headers
+ GLOBAL contrib/libs/linux-headers/_nf
+ )
+
+ENDIF()
+
DISABLE(NEED_PLATFORM_PEERDIRS)
DISABLE(WITH_VALGRIND)
-ADDINCL(
- GLOBAL contrib/libs/linux-headers
- GLOBAL contrib/libs/linux-headers/_nf
-)
-
NO_PLATFORM()
END()
diff --git a/contrib/libs/openssl/crypto/ya.make b/contrib/libs/openssl/crypto/ya.make
index be3f2b7328..c6e9d82018 100644
--- a/contrib/libs/openssl/crypto/ya.make
+++ b/contrib/libs/openssl/crypto/ya.make
@@ -13,15 +13,16 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-# TODO(YMAKE-92) Move this information out of ya.make and allow per project configuration
-IF (OPENSOURCE_PROJECT == "catboost")
+IF (OPENSOURCE_REPLACE_OPENSSL)
+
OPENSOURCE_EXPORT_REPLACEMENT(
CMAKE OpenSSL
CMAKE_PACKAGE_COMPONENT Crypto
CMAKE_TARGET OpenSSL::Crypto
- CONAN openssl/1.1.1t
+ CONAN openssl/${OPENSOURCE_REPLACE_OPENSSL}
)
-ENDIF()
+
+ENDIF() # IF (OPENSOURCE_REPLACE_OPENSSL)
PEERDIR(
contrib/libs/zlib
@@ -37,8 +38,7 @@ ADDINCL(
contrib/libs/openssl/include
)
-# TODO(YMAKE-92) Move this information out of ya.make and allow per project configuration
-IF (NOT EXPORT_CMAKE OR OPENSOURCE_PROJECT != "catboost")
+IF (NOT EXPORT_CMAKE OR NOT OPENSOURCE_REPLACE_OPENSSL)
IF (OS_LINUX)
IF (ARCH_ARM64)
@@ -1362,6 +1362,6 @@ IF (ARCADIA_OPENSSL_DISABLE_ARMV7_TICK)
)
ENDIF()
-ENDIF()
+ENDIF() # IF (NOT EXPORT_CMAKE OR NOT OPENSOURCE_REPLACE_OPENSSL)
END()
diff --git a/contrib/libs/openssl/ya.make b/contrib/libs/openssl/ya.make
index e8d70a9a31..802b2c76c3 100644
--- a/contrib/libs/openssl/ya.make
+++ b/contrib/libs/openssl/ya.make
@@ -6,13 +6,20 @@ VERSION(1.1.1t)
ORIGINAL_SOURCE(https://github.com/openssl/openssl/archive/OpenSSL_1_1_1t.tar.gz)
-# TODO(YMAKE-92) Move this information out of ya.make and allow per project configuration
-IF (OPENSOURCE_PROJECT == "catboost")
+IF (OPENSOURCE_REPLACE_OPENSSL AND EXPORT_CMAKE)
+
OPENSOURCE_EXPORT_REPLACEMENT(
CMAKE OpenSSL
CMAKE_TARGET OpenSSL::OpenSSL
- CONAN openssl/1.1.1t
+ CONAN openssl/${OPENSOURCE_REPLACE_OPENSSL}
+ )
+
+ELSE()
+
+ ADDINCL(
+ GLOBAL contrib/libs/openssl/include
)
+
ENDIF()
LICENSE(
@@ -33,12 +40,10 @@ PEERDIR(
)
ADDINCL(
- GLOBAL contrib/libs/openssl/include
contrib/libs/openssl
)
-# TODO(YMAKE-92) Move this information out of ya.make and allow per project configuration
-IF (NOT EXPORT_CMAKE OR OPENSOURCE_PROJECT != "catboost")
+IF (NOT EXPORT_CMAKE OR NOT OPENSOURCE_REPLACE_OPENSSL)
IF (OS_LINUX)
IF (ARCH_ARM64)
@@ -335,7 +340,7 @@ IF (OS_ANDROID AND ARCH_ARM64)
)
ENDIF()
-ENDIF()
+ENDIF() # IF (NOT EXPORT_CMAKE OR NOT OPENSOURCE_REPLACE_OPENSSL)
END()
diff --git a/contrib/libs/protobuf/ya.make b/contrib/libs/protobuf/ya.make
index 258e325959..b8ba3c36fc 100644
--- a/contrib/libs/protobuf/ya.make
+++ b/contrib/libs/protobuf/ya.make
@@ -15,18 +15,28 @@ VERSION(3.19.0)
ORIGINAL_SOURCE(https://github.com/protocolbuffers/protobuf/archive/v3.19.0.tar.gz)
+IF (OPENSOURCE_REPLACE_PROTOBUF AND EXPORT_CMAKE)
+
+ OPENSOURCE_EXPORT_REPLACEMENT(
+ CMAKE Protobuf
+ CMAKE_TARGET protobuf::libprotobuf protobuf::libprotoc
+ CONAN protobuf/${OPENSOURCE_REPLACE_PROTOBUF} "&& conan_require_tool" protobuf/${OPENSOURCE_REPLACE_PROTOBUF} "&& conan_import \"bin, protoc* -> ./bin\" && vanilla_protobuf"
+ )
+
+ELSE()
+
+ ADDINCL(
+ GLOBAL contrib/libs/protobuf/src
+ GLOBAL FOR proto contrib/libs/protobuf/src
+ )
+
+ENDIF()
+
PEERDIR(
contrib/libs/zlib
library/cpp/sanitizer/include
)
-ADDINCL(
- GLOBAL contrib/libs/protobuf/src
- GLOBAL FOR
- proto
- contrib/libs/protobuf/src
-)
-
NO_COMPILER_WARNINGS()
CFLAGS(
diff --git a/contrib/libs/protoc/ya.make b/contrib/libs/protoc/ya.make
index f1134013cb..927ead0dbd 100644
--- a/contrib/libs/protoc/ya.make
+++ b/contrib/libs/protoc/ya.make
@@ -13,16 +13,28 @@ VERSION(3.19.0)
ORIGINAL_SOURCE(https://github.com/protocolbuffers/protobuf/archive/v3.19.0.tar.gz)
+IF (OPENSOURCE_REPLACE_PROTOBUF AND EXPORT_CMAKE)
+
+ OPENSOURCE_EXPORT_REPLACEMENT(
+ CMAKE Protobuf
+ CMAKE_TARGET protobuf::libprotobuf protobuf::libprotoc
+ CONAN protobuf/${OPENSOURCE_REPLACE_PROTOBUF} "&& conan_require_tool" protobuf/${OPENSOURCE_REPLACE_PROTOBUF} "&& conan_import \"bin, protoc* -> ./bin\" && vanilla_protobuf"
+ )
+
+ELSE()
+
+ ADDINCL(
+ GLOBAL contrib/libs/protoc/src
+ )
+
+ENDIF()
+
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
PEERDIR(
contrib/libs/protobuf
)
-ADDINCL(
- GLOBAL contrib/libs/protoc/src
-)
-
NO_COMPILER_WARNINGS()
NO_UTIL()