@ -1065,28 +1065,34 @@ set(ROCKSDB_PLUGIN_BUILTINS "")
message ( STATUS "ROCKSDB PLUGINS TO BUILD ${ROCKSDB_PLUGINS}" )
message ( STATUS "ROCKSDB PLUGINS TO BUILD ${ROCKSDB_PLUGINS}" )
foreach ( PLUGIN IN LISTS PLUGINS )
foreach ( PLUGIN IN LISTS PLUGINS )
set ( PLUGIN_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/plugin/${PLUGIN}/" )
set ( PLUGIN_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/plugin/${PLUGIN}/" )
message ( "including rocksb plugin ${PLUGIN_ROOT}")
message ( STATUS "PLUGIN ${PLUGIN} including rocksb plugin ${PLUGIN_ROOT}")
set ( PLUGINMKFILE "${PLUGIN_ROOT}${PLUGIN}.mk" )
set ( PLUGINMKFILE "${PLUGIN_ROOT}${PLUGIN}.mk" )
if ( NOT EXISTS ${ PLUGINMKFILE } )
if ( NOT EXISTS ${ PLUGINMKFILE } )
message ( FATAL_ERROR "Missing plugin makefile: ${PLUGINMKFILE}" )
message ( FATAL_ERROR "PLUGIN ${PLUGIN} Missing plugin makefile: ${PLUGINMKFILE}" )
endif ( )
endif ( )
file ( READ ${ PLUGINMKFILE } PLUGINMK )
file ( READ ${ PLUGINMKFILE } PLUGINMK )
string ( REGEX MATCH "SOURCES = ([^\n]*)" FOO ${ PLUGINMK } )
string ( REGEX MATCH "SOURCES = ([^\n]*)" FOO ${ PLUGINMK } )
set ( MK_SOURCES ${ CMAKE_MATCH_1 } )
set ( MK_SOURCES ${ CMAKE_MATCH_1 } )
separate_arguments ( MK_SOURCES )
separate_arguments ( MK_SOURCES )
foreach ( MK_FILE IN LISTS MK_SOURCES )
foreach ( MK_FILE IN LISTS MK_SOURCES )
list ( APPEND SOURCES "${PLUGIN_ROOT}${MK_FILE}" )
list ( APPEND SOURCES "${PLUGIN_ROOT}${MK_FILE}" )
message ( STATUS "PLUGIN ${PLUGIN} Appending ${PLUGIN_ROOT}${MK_FILE} to SOURCES" )
endforeach ( )
endforeach ( )
string ( REGEX MATCH "_FUNC = ([^\n]*)" FOO ${ PLUGINMK } )
string ( REGEX MATCH "_FUNC = ([^\n]*)" FOO ${ PLUGINMK } )
if ( NOT ${ CMAKE_MATCH_1 } STREQUAL "" )
if ( NOT ${ CMAKE_MATCH_1 } STREQUAL "" )
string ( APPEND ROCKSDB_PLUGIN_BUILTINS "{\" ${ PLUGIN } \", " ${CMAKE_MATCH_1} " }, " )
string ( APPEND ROCKSDB_PLUGIN_BUILTINS "{\" ${ PLUGIN } \", " ${CMAKE_MATCH_1} " }, " )
string ( APPEND ROCKSDB_PLUGIN_EXTERNS "int " ${ CMAKE_MATCH_1 } "(ROCKSDB_NAMESPACE::ObjectLibrary&, const std::string&); " )
string ( APPEND ROCKSDB_PLUGIN_EXTERNS "int " ${ CMAKE_MATCH_1 } "(ROCKSDB_NAMESPACE::ObjectLibrary&, const std::string&); " )
endif ( )
endif ( )
string ( REGEX MATCH "_LIBS = ([^\n]*)" FOO ${ PLUGINMK } )
string ( REGEX MATCH "_LIBS = ([^\n]*)" FOO ${ PLUGINMK } )
if ( NOT ${ CMAKE_MATCH_1 } STREQUAL "" )
separate_arguments ( CMAKE_MATCH_1 )
list ( APPEND THIRDPARTY_LIBS "${CMAKE_MATCH_1}" )
foreach ( MK_LIB IN LISTS CMAKE_MATCH_1 )
endif ( )
list ( APPEND THIRDPARTY_LIBS "${MK_LIB}" )
message ( "THIRDPARTY_LIBS=${THIRDPARTY_LIBS}" )
endforeach ( )
message ( STATUS "PLUGIN ${PLUGIN} THIRDPARTY_LIBS=${THIRDPARTY_LIBS}" )
# T O D O : W e n e e d t o s e t a n y c o m p i l e / l i n k - t i m e f l a g s a n d a d d a n y l i n k l i b r a r i e s
# T O D O : W e n e e d t o s e t a n y c o m p i l e / l i n k - t i m e f l a g s a n d a d d a n y l i n k l i b r a r i e s
endforeach ( )
endforeach ( )