File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1091,13 +1091,27 @@ add_library(Td::TdStatic ALIAS TdStatic)
1091
1091
add_library (Td::TdJson ALIAS TdJson )
1092
1092
add_library (Td::TdJsonStatic ALIAS TdJsonStatic )
1093
1093
1094
- install (TARGETS tdjson TdJson tdjson_static TdJsonStatic tdjson_private tdclient tdcore tdapi TdStatic EXPORT TdTargets
1094
+ set (INSTALL_TARGETS tdjson TdJson )
1095
+ set (INSTALL_STATIC_TARGETS tdjson_static TdJsonStatic tdjson_private tdcore )
1096
+ if (BUILD_SHARED_LIBS )
1097
+ set (INSTALL_TARGETS ${INSTALL_TARGETS} tdclient TdStatic tdapi )
1098
+ else ()
1099
+ set (INSTALL_STATIC_TARGETS ${INSTALL_STATIC_TARGETS} tdclient TdStatic tdapi )
1100
+ endif ()
1101
+
1102
+ install (TARGETS ${INSTALL_TARGETS} EXPORT TdTargets
1095
1103
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR} "
1096
1104
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} "
1097
1105
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} "
1098
1106
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
1099
1107
)
1100
1108
1109
+ install (TARGETS ${INSTALL_STATIC_TARGETS} EXPORT TdStaticTargets
1110
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR} "
1111
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} "
1112
+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
1113
+ )
1114
+
1101
1115
# generate pkg-config files
1102
1116
include (GeneratePkgConfig )
1103
1117
You can’t perform that action at this time.
0 commit comments