@ -1,14 +1,6 @@
# Edit definitions below to specify paths to include files and libraries of all 3rd party libraries
#
# Edit these lines to set defaults for use of external libraries
#
set(USE_GFLAGS_DEFAULT 0) # GFLAGS is disabled by default, enable with -DGFLAGS=1 cmake command line agrument
set(USE_SNAPPY_DEFAULT 0) # SNAPPY is disabled by default, enable with -DSNAPPY=1 cmake command line agrument
set(USE_LZ4_DEFAULT 0) # LZ4 is disabled by default, enable with -DLZ4=1 cmake command line agrument
set(USE_ZLIB_DEFAULT 0) # ZLIB is disabled by default, enable with -DZLIB=1 cmake command line agrument
set(USE_XPRESS_DEFAULT 0) # XPRESS is disabled by default, enable with -DXPRESS=1 cmake command line agrument
# TODO: Make this work with find_package and/or get rid of it
#
# This example assumes all the libraries locate in directories under THIRDPARTY_HOME environment variable
# Set environment variable THIRDPARTY_HOME to point to your third party libraries home (Unix style dir separators)
@ -17,7 +9,7 @@ set(USE_XPRESS_DEFAULT 0) # XPRESS is disabled by default, enable with -D
set (THIRDPARTY_LIBS "") # Initialization, don't touch
#
# Edit these 4 lines to define paths to GFLAGS
# Defaults
#
set(GFLAGS_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library)
set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include)
@ -25,16 +17,12 @@ set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/bin/debug/amd64/gflags.lib)
set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib)
# ================================================== GFLAGS ==================================================
#
# Don't touch these lines
#
if (DEFINED GFLAGS)
set(USE_GFLAGS ${GFLAGS})
else ()
set(USE_GFLAGS ${USE_GFLAGS_DEFAULT})
# For compatibility
if (GFLAGS)
set(WITH_GFLAGS ON)
endif ()
if (${USE_GFLAGS} EQUAL 1 )
if (WITH_GFLAGS)
message(STATUS "GFLAGS library is enabled")
if(DEFINED ENV{GFLAGS_INCLUDE})
@ -68,16 +56,12 @@ set(SNAPPY_INCLUDE ${SNAPPY_HOME}/inc/inc)
set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib)
set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib)
#
# Don't touch these lines
#
if (DEFINED SNAPPY)
set(USE_SNAPPY ${SNAPPY})
else ()
set(USE_SNAPPY ${USE_SNAPPY_DEFAULT})
# For compatibility
if(SNAPPY)
set(WITH_SNAPPY ON)
endif ()
if (${USE_SNAPPY} EQUAL 1 )
if (WITH_SNAPPY)
message(STATUS "SNAPPY library is enabled")
if(DEFINED ENV{SNAPPY_INCLUDE})
@ -115,12 +99,10 @@ set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib)
# Don't touch these lines
#
if (DEFINED LZ4)
set(USE_LZ4 ${LZ4})
else ()
set(USE_LZ4 ${USE_LZ4_DEFAULT})
set(WITH_LZ4 ON)
endif ()
if (${USE_LZ4} EQUAL 1 )
if (WITH_LZ4 )
message(STATUS "LZ4 library is enabled")
if(DEFINED ENV{LZ4_INCLUDE})
@ -157,13 +139,13 @@ set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/bin/retail/amd64/zlib.lib)
#
# Don't touch these lines
#
if (DEFINED ZLIB)
set(USE_ZLIB ${ZLIB})
else ( )
set(USE_ZLIB ${USE_ZLIB_DEFAULT} )
# For compatibilty
if (ZLIB )
set(WITH_ZLIB ON )
endif ()
if (${USE_ZLIB} EQUAL 1 )
if (WITH_ZLIB )
message(STATUS "ZLIB library is enabled")
if(DEFINED ENV{ZLIB_INCLUDE})
@ -188,13 +170,12 @@ else ()
message(STATUS "ZLIB library is disabled")
endif ()
if (DEFINED XPRESS)
set(USE_XPRESS ${XPRESS})
else ()
set(USE_XPRESS ${USE_XPRESS_DEFAULT})
# For compatibilty
if (XPRESS)
set(WITH_XPRESS ON)
endif ()
if (${USE_XPRESS} EQUAL 1 )
if (WITH_XPRESS )
message(STATUS "XPRESS is enabled")
add_definitions(-DXPRESS)
@ -218,7 +199,7 @@ set(JEMALLOC_LIB_RELEASE ${JEMALLOC_HOME}/bin/retail/amd64/jemalloc.lib)
# Don't touch these lines
#
# For compatibilty with previous
# For compatibilty
if(JEMALLOC)
set(WITH_JEMALLOC ON)
endif()