# general cmake flags: # -DCMAKE_INSTALL_PREFIX=/usr/local -- the prefix for installing # -DCMAKE_BUILD_TYPE=type -- type can be Debug, Release, ... # -DCMAKE_PREFIX_PATH=/dir -- external packages # # note that CMAKE_PREFIX_PATH can be a list of directories: # -DCMAKE_PREFIX_PATH='/dir1;/dir2;/dir3' # cmake_minimum_required (VERSION 3.0) project (hepnos CXX) enable_testing () # add our cmake module directory to the path set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # link shared lib with full rpath set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # setup cache variables for ccmake if (NOT CMAKE_BUILD_TYPE) set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo" "MinSizeRel") endif () set (CMAKE_PREFIX_PATH "" CACHE STRING "External dependencies path") set (BUILD_SHARED_LIBS "OFF" CACHE BOOL "Build a shared library") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) # packages we depend on include (xpkg-import) find_package (mercury CONFIG REQUIRED) find_package (Boost REQUIRED COMPONENTS serialization system filesystem) include_directories(${Boost_INCLUDE_DIRS}) xpkg_import_module (margo REQUIRED margo) xpkg_import_module (sdskv-client REQUIRED sdskv-client) xpkg_import_module (bake-client REQUIRED bake-client) xpkg_import_module (sdskv-server REQUIRED sdskv-server) xpkg_import_module (bake-server REQUIRED bake-server) xpkg_import_module (ch-placement REQUIRED ch-placement) find_package (yaml-cpp REQUIRED) add_subdirectory (src) add_subdirectory (test) add_subdirectory (bin)