cmake_minimum_required(VERSION 3.15) project(Kylin) option(INDEPENDENT_BUILD "build self." OFF) option(UNIT_TEST "do unit test" OFF) if(INDEPENDENT_BUILD) set(KYLIN_WITH_FLUENT ON) if(WIN32) set(Projects_ROOT E:/Projects) set(Libraries_ROOT ${Projects_ROOT}/Libraries) set(BOOST_ROOT ${Libraries_ROOT}/boost_1_86_0_msvc2022_64bit) set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include/boost-1_86) add_compile_definitions( BOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN10 ) else() execute_process( COMMAND sh -c "echo $HOME" OUTPUT_VARIABLE USER_HOME OUTPUT_STRIP_TRAILING_WHITESPACE ) set(Projects_ROOT ${USER_HOME}/Projects) set(Libraries_ROOT /opt/Libraries) set(BOOST_ROOT ${Libraries_ROOT}/boost_1_86_0) set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include) endif() add_subdirectory(Examples) endif() find_package(Boost REQUIRED COMPONENTS log serialization) set(OpenSSL_LIBRARY ssl crypto) add_subdirectory(DataStructure) if(TARGET Boost::serialization) add_subdirectory(Encrypt) endif() add_subdirectory(HttpProxy) if(KYLIN_WITH_FLUENT) add_subdirectory(Fluent) endif() add_subdirectory(Universal) if(UNIT_TEST) add_subdirectory(UnitTest) endif()