mariadb/storage/tokudb/CMakeLists.txt
Leif Walsh 2ccde85fc2 refs #5368 add lto flags to handlerton
git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@48336 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-17 00:02:14 -04:00

14 lines
853 B
CMake

SET(TOKUDB_VERSION $ENV{TOKUDB_VERSION})
SET(TOKUFRACTALTREE_RELEASE_DIR $ENV{TOKUFRACTALTREE})
SET(TOKUFRACTALTREE_LIBNAME $ENV{TOKUFRACTALTREE_LIBNAME})
SET(TOKUPORTABILITY_LIBNAME $ENV{TOKUPORTABILITY_LIBNAME})
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"")
INCLUDE_DIRECTORIES(${TOKUFRACTALTREE_RELEASE_DIR}/include)
FIND_LIBRARY(TOKUFRACTALTREE_LIB NAMES ${TOKUFRACTALTREE_LIBNAME} HINTS ${TOKUFRACTALTREE_RELEASE_DIR}/lib)
FIND_LIBRARY(TOKUPORTABILITY_LIB NAMES ${TOKUPORTABILITY_LIBNAME} HINTS ${TOKUFRACTALTREE_RELEASE_DIR}/lib)
SET(TOKUDB_PLUGIN_DYNAMIC "ha_tokudb")
SET(TOKUDB_SOURCES ha_tokudb.cc)
MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES ${TOKUFRACTALTREE_LIB} ${TOKUPORTABILITY_LIB} z stdc++)
SET_PROPERTY(TARGET tokudb APPEND PROPERTY LINK_FLAGS_RELEASE "-flto -fuse-linker-plugin")