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::
|
NAMESPACE Td::
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/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 tdjson/tdjson_static:
|
||||||
install(FILES ${TD_JSON_HEADERS} "${CMAKE_CURRENT_BINARY_DIR}/td/telegram/tdjson_export.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/telegram")
|
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)
|
include(CMakeFindDependencyMacro)
|
||||||
#TODO: write all external dependencies
|
#TODO: write all external dependencies
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/TdTargets.cmake")
|
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)
|
target_compile_options(tdsqlite PRIVATE /wd4996)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS tdsqlite EXPORT TdTargets
|
install(TARGETS tdsqlite EXPORT TdStaticTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
|
@ -56,7 +56,7 @@ if (NOT CMAKE_CROSSCOMPILING)
|
|||||||
target_link_libraries(example PRIVATE tdactor)
|
target_link_libraries(example PRIVATE tdactor)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS tdactor EXPORT TdTargets
|
install(TARGETS tdactor EXPORT TdStaticTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
|
@ -56,7 +56,7 @@ if (NOT CMAKE_CROSSCOMPILING)
|
|||||||
target_link_libraries(binlog_dump PRIVATE tddb)
|
target_link_libraries(binlog_dump PRIVATE tddb)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS tddb EXPORT TdTargets
|
install(TARGETS tddb EXPORT TdStaticTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
|
@ -84,7 +84,7 @@ if (APPLE_WATCH)
|
|||||||
target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY})
|
target_link_libraries(tdnet PRIVATE ${FOUNDATION_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS tdnet EXPORT TdTargets
|
install(TARGETS tdnet EXPORT TdStaticTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE 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)
|
target_link_libraries(tdutils PUBLIC atomic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS tdutils EXPORT TdTargets
|
install(TARGETS tdutils EXPORT TdStaticTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user