Rename targets and config files for consistency

CMake does check both suffixes anyway (-config and Config), but since
the project name is "libtorrent-rasterbar", the "-config" suffix looks
better.
This commit is contained in:
Eugene Shalygin 2018-05-02 12:50:14 +02:00 committed by Arvid Norberg
parent 8b87b42a5a
commit 7f2ce2ba9e
2 changed files with 10 additions and 12 deletions

View File

@ -779,7 +779,7 @@ include(CheckCXXCompilerFlag)
add_subdirectory(bindings)
install(TARGETS torrent-rasterbar EXPORT torrent-rasterbarTargets
install(TARGETS torrent-rasterbar EXPORT libtorrent-rasterbar-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
@ -799,26 +799,24 @@ else()
endif()
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbarConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbar-config-version.cmake"
VERSION ${libtorrent_VERSION}
COMPATIBILITY ${_compatibility}
)
export(EXPORT torrent-rasterbarTargets
FILE "${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbarTargets.cmake"
export(EXPORT libtorrent-rasterbar-targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbar-targets.cmake"
NAMESPACE Libtorrent::
)
configure_package_config_file(libtorrent-rasterbarConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbarConfig.cmake"
configure_package_config_file(libtorrent-rasterbar-config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbar-config.cmake"
INSTALL_DESTINATION "${ConfigPackageLocation}"
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
install(EXPORT torrent-rasterbarTargets
FILE
libtorrent-rasterbarTargets.cmake
install(EXPORT libtorrent-rasterbar-targets
NAMESPACE
Libtorrent::
DESTINATION
@ -826,8 +824,8 @@ install(EXPORT torrent-rasterbarTargets
)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbarConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbarConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbar-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar/libtorrent-rasterbar-config-version.cmake"
DESTINATION
${ConfigPackageLocation}
)

View File

@ -8,7 +8,7 @@
include(CMakeFindDependencyMacro)
@_find_dependency_calls@
include("${CMAKE_CURRENT_LIST_DIR}/libtorrent-rasterbarTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/libtorrent-rasterbar-targets.cmake")
get_target_property(@PROJECT_NAME@_INCLUDE_DIRS Libtorrent::torrent-rasterbar INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(_lt_iface_link_libraries Libtorrent::torrent-rasterbar INTERFACE_LINK_LIBRARIES)