Export static targets in a separate file
This commit is contained in:
parent
5881dde135
commit
ebd77d5152
@ -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")
|
||||
|
@ -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()
|
||||
|
@ -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}"
|
||||
)
|
||||
|
@ -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}"
|
||||
)
|
||||
|
@ -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}"
|
||||
)
|
||||
|
@ -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}"
|
||||
)
|
||||
|
@ -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}"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user