mdbx-cmake: fix missing installation of mdbx.h++

Change-Id: I41975e4eeff6583a266b273b9a4f8486982ede90
This commit is contained in:
Leonid Yuriev 2020-10-02 00:05:02 +03:00
parent 5807e2eda0
commit dc2cd19d56

View File

@ -485,7 +485,8 @@ fetch_version(MDBX "${CMAKE_CURRENT_SOURCE_DIR}" FALSE)
message(STATUS "libmdbx version is ${MDBX_VERSION}")
# sources list
set(LIBMDBX_SOURCES mdbx.h "${CMAKE_CURRENT_BINARY_DIR}/config.h" )
set(LIBMDBX_PUBLIC_HEADERS mdbx.h)
set(LIBMDBX_SOURCES mdbx.h "${CMAKE_CURRENT_BINARY_DIR}/config.h")
if(MDBX_AMALGAMATED_SOURCE)
list(APPEND LIBMDBX_SOURCES mdbx.c)
else()
@ -511,6 +512,7 @@ else()
endif(MDBX_AMALGAMATED_SOURCE)
if(MDBX_BUILD_CXX)
message(STATUS "Use C${MDBX_C_STANDARD} and C++${MDBX_CXX_STANDARD} for libmdbx")
list(APPEND LIBMDBX_PUBLIC_HEADERS mdbx.h++)
list(APPEND LIBMDBX_SOURCES "${MDBX_SOURCE_DIR}/mdbx.c++" mdbx.h++)
else()
message(STATUS "Use C${MDBX_C_STANDARD} for libmdbx but C++ portion is disabled")
@ -561,7 +563,7 @@ if(MDBX_INSTALL_STATIC)
else()
add_library(mdbx-static STATIC EXCLUDE_FROM_ALL ${LIBMDBX_SOURCES})
endif()
set_target_properties(mdbx-static PROPERTIES PUBLIC_HEADER mdbx.h)
set_target_properties(mdbx-static PROPERTIES PUBLIC_HEADER "${LIBMDBX_PUBLIC_HEADERS}")
target_compile_definitions(mdbx-static PRIVATE MDBX_BUILD_SHARED_LIBRARY=0)
target_setup_options(mdbx-static)
libmdbx_setup_libs(mdbx-static INTERFACE)
@ -576,7 +578,7 @@ endif()
# build shared library
if(MDBX_BUILD_SHARED_LIBRARY)
add_library(mdbx SHARED ${LIBMDBX_SOURCES})
set_target_properties(mdbx PROPERTIES PUBLIC_HEADER mdbx.h)
set_target_properties(mdbx PROPERTIES PUBLIC_HEADER "${LIBMDBX_PUBLIC_HEADERS}")
target_compile_definitions(mdbx PRIVATE LIBMDBX_EXPORTS MDBX_BUILD_SHARED_LIBRARY=1 INTERFACE LIBMDBX_IMPORTS)
target_setup_options(mdbx)
libmdbx_setup_libs(mdbx PRIVATE)