-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
82 lines (73 loc) · 3.15 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
cmake_minimum_required(VERSION 3.8)
set(CMAKE_CXX_STANDARD 17)
project(CPlusPlusStudy)
# cmake modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
###############################################################################
# Libraries
###############################################################################
# find packages for basic libraries
find_package(Gflags REQUIRED) # gflags
find_package(Glog REQUIRED) # glog
find_package(fmt REQUIRED) # format
find_package(Eigen3 REQUIRED) # Eigen
# prive dependency include directories and libraries
list(APPEND DEPEND_INCLUDES
${GFLAGS_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
list(APPEND DEPEND_LIBS
${GFLAGS_LIBRARIES}
${GLOG_LIBRARIES}
fmt::fmt-header-only
)
###############################################################################
# Project Setting
###############################################################################
# default build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
# projects build setting
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# project name
set(PRJ_LIB_COMMON common) # common library
# project depends
list(APPEND DEPEND_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/common/include)
list(APPEND DEPEND_LIBS)
# projects
add_subdirectory(common) # common library
add_subdirectory(syntax) # c++ syntax
add_subdirectory(thread) # C++11 thread
add_subdirectory(Eigen) # Eigen study
add_subdirectory(Sophus) # Sophus study
add_subdirectory(ceres) # Ceres study
# add_subdirectory(g2o) # g2o study
add_subdirectory(pcl) # PCL study
add_subdirectory(clipper) # clipper study
add_subdirectory(algorithm) # algorithm
add_subdirectory(math) # math
add_subdirectory(Pangolin) # Pangolin study
add_subdirectory(boost) # boost study
add_subdirectory(cxxopts) # cxxopts study
add_subdirectory(spdlog) # spdlog study
add_subdirectory(json) # json(nlohmann/json) study
add_subdirectory(jsoncpp) # jsoncpp study
add_subdirectory(yaml) # YAML study
add_subdirectory(protobuf) # protobuf study
add_subdirectory(SqliteCpp) # SQLiteCpp study
add_subdirectory(SqliteOrm) # SQLite ORM study
add_subdirectory(SqliteModernCpp) # SqliteModernCpp study
add_subdirectory(archive) # libarchive study
add_subdirectory(httplib) # httplib
add_subdirectory(hv) # libhv
add_subdirectory(TurboJpeg) # TurboJpeg study
add_subdirectory(VideoProcess) # video process
add_subdirectory(system) # system applications
add_subdirectory(pybind) # pybind study
add_subdirectory(others) # others