Align CMake configuration with related projects.
PiperOrigin-RevId: 279238007
This commit is contained in:
parent
0c40829872
commit
41c8d83914
@ -443,23 +443,28 @@ if(LEVELDB_INSTALL)
|
|||||||
"${LEVELDB_PUBLIC_INCLUDE_DIR}/table_builder.h"
|
"${LEVELDB_PUBLIC_INCLUDE_DIR}/table_builder.h"
|
||||||
"${LEVELDB_PUBLIC_INCLUDE_DIR}/table.h"
|
"${LEVELDB_PUBLIC_INCLUDE_DIR}/table.h"
|
||||||
"${LEVELDB_PUBLIC_INCLUDE_DIR}/write_batch.h"
|
"${LEVELDB_PUBLIC_INCLUDE_DIR}/write_batch.h"
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/leveldb
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/leveldb"
|
||||||
)
|
)
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
configure_package_config_file(
|
||||||
|
"cmake/${PROJECT_NAME}Config.cmake.in"
|
||||||
|
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake"
|
||||||
|
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||||
|
)
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
"${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake"
|
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
|
||||||
COMPATIBILITY SameMajorVersion
|
COMPATIBILITY SameMajorVersion
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
EXPORT leveldbTargets
|
EXPORT leveldbTargets
|
||||||
NAMESPACE leveldb::
|
NAMESPACE leveldb::
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb"
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
"cmake/leveldbConfig.cmake"
|
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake"
|
||||||
"${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake"
|
"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb"
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||||
)
|
)
|
||||||
endif(LEVELDB_INSTALL)
|
endif(LEVELDB_INSTALL)
|
||||||
|
@ -1 +0,0 @@
|
|||||||
include("${CMAKE_CURRENT_LIST_DIR}/leveldbTargets.cmake")
|
|
9
cmake/leveldbConfig.cmake.in
Normal file
9
cmake/leveldbConfig.cmake.in
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Copyright 2019 The LevelDB Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file. See the AUTHORS file for names of contributors.
|
||||||
|
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/leveldbTargets.cmake")
|
||||||
|
|
||||||
|
check_required_components(leveldb)
|
Loading…
Reference in New Issue
Block a user