aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-24 15:30:12 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-24 15:30:12 +0300
commit0a35af177414ff232a34dba196112ffaeb7dfb6d (patch)
tree64945cac14f42a4a955a28f87033723c58e76943
parent7242975d1ea33c33921a365827be7ed0fc1a1ef5 (diff)
downloadydb-0a35af177414ff232a34dba196112ffaeb7dfb6d.tar.gz
intermediate changes
ref:476cbe460057ff515d26b92b4b16691169b2876b
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/FindIDN.cmake26
2 files changed, 26 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9cc23cd1561..53eb64483fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
enable_testing()
-include(cmake/FindAIO.cmake)
include(cmake/antlr.cmake)
include(cmake/bison.cmake)
include(cmake/conan.cmake)
diff --git a/cmake/FindIDN.cmake b/cmake/FindIDN.cmake
new file mode 100644
index 00000000000..7342fb6d7ad
--- /dev/null
+++ b/cmake/FindIDN.cmake
@@ -0,0 +1,26 @@
+# - Find IDN
+#
+# IDN_INCLUDE - Where to find LibIDN public headers
+# IDN_LIBS - List of libraries when using LibIDN.
+# IDN_FOUND - True if LibIDN found.
+
+find_path(IDN_INCLUDE_DIR
+ idna.h
+ HINTS $ENV{IDN_ROOT}/include)
+
+find_library(IDN_LIBRARIES
+ idn
+ HINTS $ENV{IDN_ROOT}/lib)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(IDN DEFAULT_MSG IDN_LIBRARIES IDN_INCLUDE_DIR)
+
+mark_as_advanced(IDN_INCLUDE_DIR IDN_LIBRARIES)
+
+if (IDN_FOUND AND NOT TARGET IDN::IDN)
+ add_library(IDN::IDN UNKNOWN IMPORTED)
+ set_target_properties(IDN::IDN PROPERTIES
+ IMPORTED_LOCATION ${IDN_LIBRARIES}
+ INTERFACE_INCLUDE_DIRECTORIES ${IDN_INCLUDE_DIR}
+ )
+endif()