mdbx: fix/refine MDBX_BUILD_SHARED_LIBRARY definition.

Change-Id: If4e3d32b0ce360eb7275d962fff4b31e53926054
This commit is contained in:
Leonid Yuriev 2020-04-17 00:37:29 +03:00
parent 5d7d45f0e5
commit 90bf7eb817
2 changed files with 2 additions and 2 deletions

View File

@ -478,6 +478,7 @@ endif()
set_target_properties(mdbx-static PROPERTIES
C_STANDARD ${MDBX_C_STANDARD} C_STANDARD_REQUIRED ON
PUBLIC_HEADER mdbx.h)
target_compile_definitions(mdbx-static PRIVATE MDBX_BUILD_SHARED_LIBRARY=0)
target_setup_options(mdbx-static)
libmdbx_setup_libs(mdbx-static INTERFACE)
if(MDBX_BUILD_SHARED_LIBRARY)
@ -494,7 +495,7 @@ if(MDBX_BUILD_SHARED_LIBRARY)
set_target_properties(mdbx PROPERTIES
C_STANDARD ${MDBX_C_STANDARD} C_STANDARD_REQUIRED ON
PUBLIC_HEADER mdbx.h)
target_compile_definitions(mdbx PRIVATE LIBMDBX_EXPORTS INTERFACE LIBMDBX_IMPORTS)
target_compile_definitions(mdbx PRIVATE LIBMDBX_EXPORTS MDBX_BUILD_SHARED_LIBRARY=1 INTERFACE LIBMDBX_IMPORTS)
target_setup_options(mdbx)
libmdbx_setup_libs(mdbx PRIVATE)
if(CC_HAS_VISIBILITY AND (LTO_ENABLED OR INTERPROCEDURAL_OPTIMIZATION))

View File

@ -17,7 +17,6 @@
#ifndef MDBX_TXN_CHECKPID_AUTO
#cmakedefine01 MDBX_TXN_CHECKPID
#endif
#cmakedefine01 MDBX_BUILD_SHARED_LIBRARY
#cmakedefine MDBX_LOCKING_AUTO
#ifndef MDBX_LOCKING_AUTO
#cmakedefine MDBX_LOCKING @MDBX_LOCKING@