-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
81 lines (66 loc) · 2.39 KB
/
CMakeLists.txt
File metadata and controls
81 lines (66 loc) · 2.39 KB
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
cmake_minimum_required(VERSION 3.5.1)
include(ExternalProject)
set(CMAKE_CXX_STANDARD 14)
# Set location for all installation of libs
set(BASE_INSTALL_DIR /usr/local/)
set(BOOST_ROOT ${CMAKE_SOURCE_DIR}/boost)
set(BOOST_INSTALL_DIR ${BASE_INSTALL_DIR})
set(OPENCV_ROOT ${CMAKE_SOURCE_DIR}/opencv)
set(OPENCV_INSTALL_DIR ${BASE_INSTALL_DIR})
message("Install prefix = " ${CMAKE_INSTALL_PREFIX})
# --------------------------------------------------------------------------
# boost
ExternalProject_Add(
boost
PREFIX ${BOOST_ROOT}
TMP_DIR ${BOOST_ROOT}/temp
STAMP_DIR ${BOOST_ROOT}/stamp
#--Download step--------------
DOWNLOAD_DIR ${BOOST_ROOT}/download
URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
URL_HASH SHA256=bd0df411efd9a585e5a2212275f8762079fed8842264954675a4fddc46cfcf60
#--Configure step-------------
CONFIGURE_COMMAND ./bootstrap.sh --prefix=${BOOST_INSTALL_DIR}
#--Build step-------------
BUILD_COMMAND ./b2 install -j8
--with-filesystem
--with-system
--with-atomic
--with-date_time
--with-log
--with-regex
--with-thread
--with-math
BUILD_IN_SOURCE true
#--Install step---------------
INSTALL_COMMAND ""
INSTALL_DIR ""
)
# --------------------------------------------------------------------------
# OpenCV
ExternalProject_Add(opencv
PREFIX ${OPENCV_ROOT}
TMP_DIR ${OPENCV_ROOT}/temp
STAMP_DIR ${OPENCV_ROOT}/stamp
#--Download step--------------
DOWNLOAD_DIR ${OPENCV_ROOT}/download
URL https://github.com/opencv/opencv/archive/3.4.1.zip
TIMEOUT "60"
#SOURCE_DIR opencv
#BINARY_DIR opencv-build
UPDATE_COMMAND ""
PATCH_COMMAND ""
#--Build step-------------
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_DOCS:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_NEW_PYTHON_SUPPORT:BOOL=OFF
-DBUILD_PACKAGE:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_TESTS:BOOL=OFF
-DWITH_FFMPEG:BOOL=OFF
#--Install step---------------
-DCMAKE_INSTALL_PREFIX:PATH=${OPENCV_INSTALL_DIR}
)