Skip to content

Commit ebd77d5

Browse files
mochaaPlevlam
authored andcommitted
Export static targets in a separate file
1 parent 5881dde commit ebd77d5

7 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,11 @@ install(EXPORT TdTargets
11271127
NAMESPACE Td::
11281128
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Td"
11291129
)
1130+
install(EXPORT TdStaticTargets
1131+
FILE TdStaticTargets.cmake
1132+
NAMESPACE Td::
1133+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Td"
1134+
)
11301135

11311136
# Install tdjson/tdjson_static:
11321137
install(FILES ${TD_JSON_HEADERS} "${CMAKE_CURRENT_BINARY_DIR}/td/telegram/tdjson_export.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/telegram")

‎TdConfig.cmake‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
include(CMakeFindDependencyMacro)
22
#TODO: write all external dependencies
33
include("${CMAKE_CURRENT_LIST_DIR}/TdTargets.cmake")
4+
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/TdStaticTargets.cmake")
5+
include("${CMAKE_CURRENT_LIST_DIR}/TdStaticTargets.cmake")
6+
endif()

‎sqlite/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ elseif (MSVC)
7070
target_compile_options(tdsqlite PRIVATE /wd4996)
7171
endif()
7272

73-
install(TARGETS tdsqlite EXPORT TdTargets
73+
install(TARGETS tdsqlite EXPORT TdStaticTargets
7474
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
7575
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
7676
)

‎tdactor/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if (NOT CMAKE_CROSSCOMPILING)
5656
target_link_libraries(example PRIVATE tdactor)
5757
endif()
5858

59-
install(TARGETS tdactor EXPORT TdTargets
59+
install(TARGETS tdactor EXPORT TdStaticTargets
6060
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
6161
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
6262
)

‎tddb/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if (NOT CMAKE_CROSSCOMPILING)
5656
target_link_libraries(binlog_dump PRIVATE tddb)
5757
endif()
5858

59-
install(TARGETS tddb EXPORT TdTargets
59+
install(TARGETS tddb EXPORT TdStaticTargets
6060
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
6161
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
6262
)

‎tdnet/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ if (APPLE_WATCH)
8484
target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY})
8585
endif()
8686

87-
install(TARGETS tdnet EXPORT TdTargets
87+
install(TARGETS tdnet EXPORT TdStaticTargets
8888
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
8989
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
9090
)

‎tdutils/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
409409
target_link_libraries(tdutils PUBLIC atomic)
410410
endif()
411411

412-
install(TARGETS tdutils EXPORT TdTargets
412+
install(TARGETS tdutils EXPORT TdStaticTargets
413413
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
414414
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
415415
)

0 commit comments

Comments
 (0)