编辑 | blame | 历史 | 原始文档
cmake_minimum_required(VERSION 3.5)

# set the project name and version
project(BHomeBus VERSION 1.0)

include(cmake_options.cmake)

# control where the static and shared libraries are built so that on windows
# we don't need to tinker with the path to run the executable
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")

#option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
#option(BUILD_STATIC_LIBS "Build using static libraries" ON)

add_subdirectory(${PROJECT_SOURCE_DIR}/proto/cpp proto)
include_directories(${PROJECT_SOURCE_DIR}/box)

include_directories(${CMAKE_SOURCE_DIR}/proto)
include_directories(${CMAKE_SOURCE_DIR}/boost-1.75.0)
link_directories(${CMAKE_SOURCE_DIR}/boost-1.75.0/lib)

add_subdirectory(${PROJECT_SOURCE_DIR}/src)
add_subdirectory(${PROJECT_SOURCE_DIR}/box)
add_subdirectory(${PROJECT_SOURCE_DIR}/utest)