From 6b799754f988b3a475be29ab894782c691583de6 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 21 Oct 2024 12:58:06 +0300 Subject: Add separate TD_INSTALL_STATIC_LIBRARIES and TD_INSTALL_SHARED_LIBRARIES options. --- tdnet/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tdnet') diff --git a/tdnet/CMakeLists.txt b/tdnet/CMakeLists.txt index fead65f0b..f39c91fa2 100644 --- a/tdnet/CMakeLists.txt +++ b/tdnet/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(TDNET_ENABLE_INSTALL "Enable installation of the library." ON) + if (NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() @@ -80,7 +82,7 @@ if (APPLE_WATCH) target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY}) endif() -if (NOT TD_ENABLE_FILTERED_INSTALL OR NOT BUILD_SHARED_LIBS) +if (TDNET_ENABLE_INSTALL) install(TARGETS tdnet EXPORT TdStaticTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- cgit v1.2.3