lichao
2021-06-30 ae17d1439b35b55212c3a30712e0a60b1d6a99c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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(${CMAKE_CURRENT_BINARY_DIR}/proto)
include_directories(${PROJECT_SOURCE_DIR}/box)
 
add_subdirectory(${PROJECT_SOURCE_DIR}/src)
add_subdirectory(${PROJECT_SOURCE_DIR}/box)
add_subdirectory(${PROJECT_SOURCE_DIR}/utest)