Source

dssd-main / CMakeLists.txt

cmake_minimum_required (VERSION 2.6)
project (dssd) 

find_library(UCI uci)
#find_package(uci)

# variable_requires(TEST_VARIABLE RESULT_VARIABLE
#                 REQUIRED_VARIABLE1
#                 REQUIRED_VARIABLE2 ...)

SET(CMAKE_CXX_FLAGS "-Wall")


IF (NOT UCI)
    MESSAGE(FATAL_ERROR "Could not find uci")
ENDIF(NOT UCI)


find_library(DNET dnet)

IF (NOT ${DNET})
    find_library(DNET dnet HINTS ../elliptics/library/.libs)
    IF(DNET)
        INCLUDE_DIRECTORIES(${CMAKE_HOME_DIRECTORY}/../elliptics/include ${CMAKE_HOME_DIRECTORY}/../elliptics/config)
        link_directories(${CMAKE_HOME_DIRECTORY}/../elliptics/library/.libs)
    ENDIF(DNET)
ENDIF(NOT ${DNET})


IF (NOT DNET)
    MESSAGE(FATAL_ERROR "Could not find dnet (elliptics)")
ENDIF(NOT DNET)

find_package(Lua51)
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})

find_package(PkgConfig)

pkg_check_modules(TC tokyocabinet>=1.2.0)

add_subdirectory (src)