cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project(ariba-tunnel) # Provide some choices for CMAKE_BUILD_TYPE set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "" Release Debug RelWithDebInfo MinSizeRel) ### Find Ariba find_package(ariba 0.8.99 REQUIRED) if(NOT ariba_FOUND) message(FATAL_ERROR "Could not find ariba. " "Please have a look at the ariba_* cache variables.") endif(NOT ariba_FOUND) include_directories(${ariba_INCLUDE_DIRS}) list(APPEND ariba-tunnel_LINK_LIBRARIES ariba ariba_dht) ### Executable add_executable(ariba-tunnel Udp.cpp Tunnel.cpp main.cc ) ### LINKER target_link_libraries(ariba-tunnel ${ariba-tunnel_LINK_LIBRARIES}) # ### INSTALL # INSTALL(TARGETS ariba-tunnel # RUNTIME DESTINATION bin # ) ## set default build type IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build : None Debug Release RelWithDebInfo MinSizeRel Profiling." FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) message("---> Current build type is: ${CMAKE_BUILD_TYPE}")