mdbx-cmake: minor fix MDBX_BUILD_FLAGS preparation.

Change-Id: I91eebdffd06b4239ccc2dccd0931b3f82f0b5f52
This commit is contained in:
Leonid Yuriev 2020-11-17 13:51:10 +03:00
parent b1008b1256
commit 015ed5bc98

View File

@ -756,14 +756,21 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
endif()
endif()
# choice target to fetch definitions and options
if(MDBX_BUILD_SHARED_LIBRARY)
set(target4fetch mdbx)
else()
set(target4fetch mdbx-static)
endif()
# get definitions
get_target_property(defs_list mdbx-static COMPILE_DEFINITIONS)
get_target_property(defs_list ${target4fetch} COMPILE_DEFINITIONS)
if(defs_list)
list(APPEND MDBX_BUILD_FLAGS ${defs_list})
endif()
# get target compile options
get_target_property(options_list mdbx-static COMPILE_OPTIONS)
get_target_property(options_list ${target4fetch} COMPILE_OPTIONS)
if(options_list)
list(APPEND MDBX_BUILD_FLAGS ${options_list})
endif()