Lonkly

Untitled

Jul 16th, 2018
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 3.5)
  2.  
  3. project( products )
  4.  
  5. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/eos_libraries/fc/CMakeModules")
  6. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/eos_modules/")
  7.  
  8. include( GNUInstallDirs )
  9. include( SetupTargetMacros )
  10.  
  11. set( CMAKE_CXX_STANDARD 14 )
  12. set( CMAKE_CXX_EXTENSIONS ON )
  13. set( CXX_STANDARD_REQUIRED ON)
  14.  
  15. set( CLI_CLIENT_EXECUTABLE_NAME cleos )
  16. set( GUI_CLIENT_EXECUTABLE_NAME eosio )
  17.  
  18. set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
  19.  
  20. if ("${OPENSSL_ROOT_DIR}" STREQUAL "")
  21.     if (NOT "$ENV{OPENSSL_ROOT_DIR}" STREQUAL "")
  22.         set(OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT_DIR})
  23.         set(OPENSSL_INCLUDE_DIR ${OPENSSL_ROOT_DIR}/include)
  24.     elseif (APPLE)
  25.         set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
  26.         set(OPENSSL_INCLUDE_DIR "/usr/local/opt/openssl/include")
  27.     elseif(UNIX AND NOT APPLE)
  28.         set(OPENSSL_ROOT_DIR "/usr/include/openssl")
  29.         set(OPENSSL_INCLUDE_DIR "/usr/include/openssl/include")
  30.     else()
  31.         message(FATAL_ERROR "openssl not found and don't know where to look, please specify OPENSSL_ROOT_DIR")
  32.     endif()
  33. endif()
  34.  
  35. if(UNIX)
  36.     if(APPLE)
  37.         set(whole_archive_flag "-force_load")
  38.         set(no_whole_archive_flag "")
  39.     else()
  40.         set(whole_archive_flag "--whole-archive")
  41.         set(no_whole_archive_flag "--no-whole-archive")
  42.     endif()
  43. else()
  44.     set(whole_archive_flag "--whole-archive")
  45.     set(no_whole_archive_flag "--no-whole-archive")
  46. endif()
  47.  
  48. SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
  49. IF( WIN32 )
  50.     SET(BOOST_ROOT $ENV{BOOST_ROOT})
  51.     set(Boost_USE_MULTITHREADED ON)
  52.     set(BOOST_ALL_DYN_LINK OFF) # force dynamic linking for all libraries
  53. ENDIF(WIN32)
  54. FIND_PACKAGE(Boost 1.66 REQUIRED COMPONENTS
  55.         thread
  56.         date_time
  57.         filesystem
  58.         system
  59.         program_options
  60.         signals
  61.         serialization
  62.         chrono
  63.         unit_test_framework
  64.         context
  65.         locale
  66.         iostreams)
  67.  
  68. add_subdirectory(eos_externals)
  69.  
  70. include(wasm)
  71.  
  72. add_subdirectory(eos_libraries)
  73. add_subdirectory(eos_contracts)
RAW Paste Data