diff options
| author | OPNA2608 <opna2608@protonmail.com> | 2024-10-11 23:06:40 +0200 |
|---|---|---|
| committer | Aliaksei Levin <22669599+levlam@users.noreply.github.com> | 2024-10-21 12:33:02 +0300 |
| commit | 1e380de89fddff7132b31372f3c90091b6375077 (patch) | |
| tree | 43b1138e425d4307f6e67cd3ba06df7aa6ef13e7 /tdutils | |
| parent | 89b22ed7e77cd4f6f46bf893ef887843bde49a3b (diff) | |
Add option to install only BUILD_SHARED_LIBS-matching files
TD_ENABLE_FILTERED_INSTALL allows limiting installed libraries & supporting files to only those matching
BUILD_SHARED_LIBS.
Diffstat (limited to 'tdutils')
| -rw-r--r-- | tdutils/CMakeLists.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tdutils/CMakeLists.txt b/tdutils/CMakeLists.txt index 4760aab01..4b6ac1c2a 100644 --- a/tdutils/CMakeLists.txt +++ b/tdutils/CMakeLists.txt @@ -409,10 +409,12 @@ if (ATOMICS_LIBRARIES) target_link_libraries(tdutils PUBLIC "${ATOMICS_LIBRARIES}") endif() -install(TARGETS tdutils EXPORT TdStaticTargets - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -) +if (NOT TD_ENABLE_FILTERED_INSTALL OR NOT BUILD_SHARED_LIBS) + install(TARGETS tdutils EXPORT TdStaticTargets + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ) +endif() if (TD_TEST_FOLLY AND ABSL_FOUND AND TDUTILS_USE_EXTERNAL_DEPENDENCIES) find_package(benchmark QUIET) |
