aboutsummaryrefslogtreecommitdiffhomepage
path: root/tddb
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2024-10-21 12:58:06 +0300
committerlevlam <levlam@telegram.org>2024-10-21 12:58:06 +0300
commit6b799754f988b3a475be29ab894782c691583de6 (patch)
tree6122932decf03d823d1b098f16790efd10e4cf8c /tddb
parentb39769be86584c2f100b119d4d0704cc5556ce76 (diff)
Add separate TD_INSTALL_STATIC_LIBRARIES and TD_INSTALL_SHARED_LIBRARIES options.
Diffstat (limited to 'tddb')
-rw-r--r--tddb/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/tddb/CMakeLists.txt b/tddb/CMakeLists.txt
index 7f9d40a84..423c93160 100644
--- a/tddb/CMakeLists.txt
+++ b/tddb/CMakeLists.txt
@@ -2,6 +2,8 @@ if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
message(FATAL_ERROR "CMake >= 3.0.2 is required")
endif()
+option(TDDB_ENABLE_INSTALL "Enable installation of the library." ON)
+
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
endif()
@@ -55,7 +57,7 @@ if (NOT CMAKE_CROSSCOMPILING)
target_link_libraries(binlog_dump PRIVATE tddb)
endif()
-if (NOT TD_ENABLE_FILTERED_INSTALL OR NOT BUILD_SHARED_LIBS)
+if (TDDB_ENABLE_INSTALL)
install(TARGETS tddb EXPORT TdStaticTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"