aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZephyr Lykos <git@mochaa.ws>2023-10-14 08:05:01 +0800
committerAliaksei Levin <22669599+levlam@users.noreply.github.com>2023-10-14 23:56:00 +0300
commitebd77d51524742886d3f7930357aeb8aaab1474a (patch)
tree3a06b56753b383cb2c03103b7e0cb3f6d3418381
parent5881dde135b77c95c82eda088d4aef2b22d760c6 (diff)
Export static targets in a separate file
-rw-r--r--CMakeLists.txt5
-rw-r--r--TdConfig.cmake3
-rw-r--r--sqlite/CMakeLists.txt2
-rw-r--r--tdactor/CMakeLists.txt2
-rw-r--r--tddb/CMakeLists.txt2
-rw-r--r--tdnet/CMakeLists.txt2
-rw-r--r--tdutils/CMakeLists.txt2
7 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d01833865..cfc751958 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1127,6 +1127,11 @@ install(EXPORT TdTargets
NAMESPACE Td::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Td"
)
+install(EXPORT TdStaticTargets
+ FILE TdStaticTargets.cmake
+ NAMESPACE Td::
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Td"
+)
# Install tdjson/tdjson_static:
install(FILES ${TD_JSON_HEADERS} "${CMAKE_CURRENT_BINARY_DIR}/td/telegram/tdjson_export.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/telegram")
diff --git a/TdConfig.cmake b/TdConfig.cmake
index 3cdff38c2..b3f9efdd7 100644
--- a/TdConfig.cmake
+++ b/TdConfig.cmake
@@ -1,3 +1,6 @@
include(CMakeFindDependencyMacro)
#TODO: write all external dependencies
include("${CMAKE_CURRENT_LIST_DIR}/TdTargets.cmake")
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/TdStaticTargets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/TdStaticTargets.cmake")
+endif()
diff --git a/sqlite/CMakeLists.txt b/sqlite/CMakeLists.txt
index cc698b2be..82ceb04c8 100644
--- a/sqlite/CMakeLists.txt
+++ b/sqlite/CMakeLists.txt
@@ -70,7 +70,7 @@ elseif (MSVC)
target_compile_options(tdsqlite PRIVATE /wd4996)
endif()
-install(TARGETS tdsqlite EXPORT TdTargets
+install(TARGETS tdsqlite EXPORT TdStaticTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
diff --git a/tdactor/CMakeLists.txt b/tdactor/CMakeLists.txt
index a156384ce..cf316b2f7 100644
--- a/tdactor/CMakeLists.txt
+++ b/tdactor/CMakeLists.txt
@@ -56,7 +56,7 @@ if (NOT CMAKE_CROSSCOMPILING)
target_link_libraries(example PRIVATE tdactor)
endif()
-install(TARGETS tdactor EXPORT TdTargets
+install(TARGETS tdactor EXPORT TdStaticTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
diff --git a/tddb/CMakeLists.txt b/tddb/CMakeLists.txt
index 036f0ca61..04325f56e 100644
--- a/tddb/CMakeLists.txt
+++ b/tddb/CMakeLists.txt
@@ -56,7 +56,7 @@ if (NOT CMAKE_CROSSCOMPILING)
target_link_libraries(binlog_dump PRIVATE tddb)
endif()
-install(TARGETS tddb EXPORT TdTargets
+install(TARGETS tddb EXPORT TdStaticTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
diff --git a/tdnet/CMakeLists.txt b/tdnet/CMakeLists.txt
index e14f3500f..d490f87f6 100644
--- a/tdnet/CMakeLists.txt
+++ b/tdnet/CMakeLists.txt
@@ -84,7 +84,7 @@ if (APPLE_WATCH)
target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY})
endif()
-install(TARGETS tdnet EXPORT TdTargets
+install(TARGETS tdnet EXPORT TdStaticTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
diff --git a/tdutils/CMakeLists.txt b/tdutils/CMakeLists.txt
index 56176ed34..b06c5c9e6 100644
--- a/tdutils/CMakeLists.txt
+++ b/tdutils/CMakeLists.txt
@@ -409,7 +409,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
target_link_libraries(tdutils PUBLIC atomic)
endif()
-install(TARGETS tdutils EXPORT TdTargets
+install(TARGETS tdutils EXPORT TdStaticTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)