Allow to change CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_INCLUDEDIR.
GitOrigin-RevId: 5704095d127c7fcf2450133745ab2ac546a1177f
This commit is contained in:
parent
0152d8ea2a
commit
0198711920
@ -5,6 +5,12 @@ project(TDLib VERSION 1.5.5 LANGUAGES CXX C)
|
|||||||
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
set(CMAKE_INSTALL_LIBDIR "lib")
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
endif()
|
endif()
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||||
|
set(CMAKE_INSTALL_BINDIR "bin")
|
||||||
|
endif()
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||||
|
set(CMAKE_INSTALL_INCLUDEDIR "include")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (POLICY CMP0054)
|
if (POLICY CMP0054)
|
||||||
# do not expand quoted arguments
|
# do not expand quoted arguments
|
||||||
@ -915,8 +921,8 @@ add_library(Td::TdJsonStatic ALIAS TdJsonStatic)
|
|||||||
install(TARGETS tdjson TdJson tdjson_static TdJsonStatic tdjson_private tdclient tdcore TdStatic EXPORT TdTargets
|
install(TARGETS tdjson TdJson tdjson_static TdJsonStatic tdjson_private tdclient tdcore TdStatic EXPORT TdTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
INCLUDES DESTINATION include
|
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(EXPORT TdTargets
|
install(EXPORT TdTargets
|
||||||
@ -925,12 +931,12 @@ install(EXPORT TdTargets
|
|||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Td"
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Td"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${TD_JSON_HEADERS} "${CMAKE_CURRENT_BINARY_DIR}/td/telegram/tdjson_export.h" DESTINATION include/td/telegram)
|
install(FILES ${TD_JSON_HEADERS} "${CMAKE_CURRENT_BINARY_DIR}/td/telegram/tdjson_export.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/telegram")
|
||||||
install(FILES td/telegram/Client.h td/telegram/Log.h DESTINATION include/td/telegram)
|
install(FILES td/telegram/Client.h td/telegram/Log.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/telegram")
|
||||||
install(FILES td/tl/TlObject.h DESTINATION include/td/tl)
|
install(FILES td/tl/TlObject.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/tl")
|
||||||
install(FILES "${TL_TD_AUTO_INCLUDES}/td/telegram/td_api.h" "${TL_TD_AUTO_INCLUDES}/td/telegram/td_api.hpp" DESTINATION include/td/telegram)
|
install(FILES "${TL_TD_AUTO_INCLUDES}/td/telegram/td_api.h" "${TL_TD_AUTO_INCLUDES}/td/telegram/td_api.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/telegram")
|
||||||
if (TD_ENABLE_JNI)
|
if (TD_ENABLE_JNI)
|
||||||
install(FILES td/tl/tl_jni_object.h DESTINATION include/td/tl)
|
install(FILES td/tl/tl_jni_object.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/tl")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT OPENSSL_FOUND)
|
if (NOT OPENSSL_FOUND)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
@ -47,6 +51,4 @@ endif()
|
|||||||
install(TARGETS tdsqlite EXPORT TdTargets
|
install(TARGETS tdsqlite EXPORT TdTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
INCLUDES DESTINATION include
|
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||||
|
set(CMAKE_INSTALL_BINDIR "bin")
|
||||||
|
endif()
|
||||||
|
|
||||||
file(MAKE_DIRECTORY auto/td/telegram)
|
file(MAKE_DIRECTORY auto/td/telegram)
|
||||||
file(MAKE_DIRECTORY auto/td/mtproto)
|
file(MAKE_DIRECTORY auto/td/mtproto)
|
||||||
|
|
||||||
@ -129,9 +133,9 @@ if (NOT CMAKE_CROSSCOMPILING)
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (TD_ENABLE_JNI)
|
if (TD_ENABLE_JNI)
|
||||||
install(TARGETS td_generate_java_api RUNTIME DESTINATION bin)
|
install(TARGETS td_generate_java_api RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||||
install(FILES JavadocTlDocumentationGenerator.php TlDocumentationGenerator.php DESTINATION bin/td/generate)
|
install(FILES JavadocTlDocumentationGenerator.php TlDocumentationGenerator.php DESTINATION "${CMAKE_INSTALL_BINDIR}/td/generate")
|
||||||
install(FILES scheme/td_api.tlo scheme/td_api.tl DESTINATION bin/td/generate/scheme)
|
install(FILES scheme/td_api.tlo scheme/td_api.tl DESTINATION "${CMAKE_INSTALL_BINDIR}/td/generate/scheme")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (TD_ENABLE_DOTNET)
|
if (TD_ENABLE_DOTNET)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
#SOURCE SETS
|
#SOURCE SETS
|
||||||
set(TDACTOR_SOURCE
|
set(TDACTOR_SOURCE
|
||||||
td/actor/impl/ConcurrentScheduler.cpp
|
td/actor/impl/ConcurrentScheduler.cpp
|
||||||
@ -52,6 +56,4 @@ endif()
|
|||||||
install(TARGETS tdactor EXPORT TdTargets
|
install(TARGETS tdactor EXPORT TdTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
INCLUDES DESTINATION include
|
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
#SOURCE SETS
|
#SOURCE SETS
|
||||||
set(TDDB_SOURCE
|
set(TDDB_SOURCE
|
||||||
td/db/binlog/Binlog.cpp
|
td/db/binlog/Binlog.cpp
|
||||||
@ -52,6 +56,4 @@ endif()
|
|||||||
install(TARGETS tddb EXPORT TdTargets
|
install(TARGETS tddb EXPORT TdTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
INCLUDES DESTINATION include
|
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT OPENSSL_FOUND)
|
if (NOT OPENSSL_FOUND)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
@ -61,6 +65,4 @@ endif()
|
|||||||
install(TARGETS tdnet EXPORT TdTargets
|
install(TARGETS tdnet EXPORT TdTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
INCLUDES DESTINATION include
|
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
if (WINGETOPT_FOUND)
|
if (WINGETOPT_FOUND)
|
||||||
set(TD_HAVE_GETOPT 1)
|
set(TD_HAVE_GETOPT 1)
|
||||||
@ -328,6 +332,4 @@ endif()
|
|||||||
install(TARGETS tdutils EXPORT TdTargets
|
install(TARGETS tdutils EXPORT TdTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
INCLUDES DESTINATION include
|
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user