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