@ -1,14 +1,6 @@
# Edit definitions below to specify paths to include files and libraries of all 3rd party libraries
# Edit definitions below to specify paths to include files and libraries of all 3rd party libraries
#
# TODO: Make this work with find_package and/or get rid of it
# 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
#
#
# This example assumes all the libraries locate in directories under THIRDPARTY_HOME environment variable
# 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)
# 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
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_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library)
set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include)
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)
set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib)
# ================================================== GFLAGS ==================================================
# ================================================== GFLAGS ==================================================
#
# For compatibility
# Don't touch these lines
if (GFLAGS)
#
set(WITH_GFLAGS ON)
if (DEFINED GFLAGS)
set(USE_GFLAGS ${GFLAGS})
else ()
set(USE_GFLAGS ${USE_GFLAGS_DEFAULT})
endif ()
endif ()
if (${USE_GFLAGS} EQUAL 1 )
if (WITH_GFLAGS)
message(STATUS "GFLAGS library is enabled")
message(STATUS "GFLAGS library is enabled")
if(DEFINED ENV{GFLAGS_INCLUDE})
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_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib)
set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib)
set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib)
#
# For compatibility
# Don't touch these lines
if(SNAPPY)
#
set(WITH_SNAPPY ON)
if (DEFINED SNAPPY)
set(USE_SNAPPY ${SNAPPY})
else ()
set(USE_SNAPPY ${USE_SNAPPY_DEFAULT})
endif ()
endif ()
if (${USE_SNAPPY} EQUAL 1 )
if (WITH_SNAPPY)
message(STATUS "SNAPPY library is enabled")
message(STATUS "SNAPPY library is enabled")
if(DEFINED ENV{SNAPPY_INCLUDE})
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
# Don't touch these lines
#
#
if (DEFINED LZ4)
if (DEFINED LZ4)
set(USE_LZ4 ${LZ4})
set(WITH_LZ4 ON)
else ()
set(USE_LZ4 ${USE_LZ4_DEFAULT})
endif ()
endif ()
if (${USE_LZ4} EQUAL 1 )
if (WITH_LZ4 )
message(STATUS "LZ4 library is enabled")
message(STATUS "LZ4 library is enabled")
if(DEFINED ENV{LZ4_INCLUDE})
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
# Don't touch these lines
#
#
if (DEFINED ZLIB)
set(USE_ZLIB ${ZLIB})
# For compatibilty
else ( )
if (ZLIB )
set(USE_ZLIB ${USE_ZLIB_DEFAULT} )
set(WITH_ZLIB ON )
endif ()
endif ()
if (${USE_ZLIB} EQUAL 1 )
if (WITH_ZLIB )
message(STATUS "ZLIB library is enabled")
message(STATUS "ZLIB library is enabled")
if(DEFINED ENV{ZLIB_INCLUDE})
if(DEFINED ENV{ZLIB_INCLUDE})
@ -188,13 +170,12 @@ else ()
message(STATUS "ZLIB library is disabled")
message(STATUS "ZLIB library is disabled")
endif ()
endif ()
if (DEFINED XPRESS)
# For compatibilty
set(USE_XPRESS ${XPRESS})
if (XPRESS)
else ()
set(WITH_XPRESS ON)
set(USE_XPRESS ${USE_XPRESS_DEFAULT})
endif ()
endif ()
if (${USE_XPRESS} EQUAL 1 )
if (WITH_XPRESS )
message(STATUS "XPRESS is enabled")
message(STATUS "XPRESS is enabled")
add_definitions(-DXPRESS)
add_definitions(-DXPRESS)
@ -218,7 +199,7 @@ set(JEMALLOC_LIB_RELEASE ${JEMALLOC_HOME}/bin/retail/amd64/jemalloc.lib)
# Don't touch these lines
# Don't touch these lines
#
#
# For compatibilty with previous
# For compatibilty
if(JEMALLOC)
if(JEMALLOC)
set(WITH_JEMALLOC ON)
set(WITH_JEMALLOC ON)
endif()
endif()