forked from Nuvoton-Israel/mctpd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt.in
104 lines (95 loc) · 4 KB
/
CMakeLists.txt.in
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
ExternalProject_Add(
Boost
URL https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2
URL_MD5 4cdf9b5c2dc01fb2b7b733d5af30e558
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/boost"
BINARY_DIR "${CMAKE_BINARY_DIR}/libs/boost"
CONFIGURE_COMMAND cd <SOURCE_DIR> && ./bootstrap.sh
BUILD_COMMAND cd <SOURCE_DIR> && ./b2 --exec-prefix=<BINARY_DIR>
--prefix=<BINARY_DIR> --with-system --with-coroutine install
INSTALL_COMMAND ""
UPDATE_COMMAND "")
# requires apt install autoconf-archive and autoconf
ExternalProject_Add(
sdbusplus-project
GIT_REPOSITORY https://github.com/openbmc/sdbusplus.git
GIT_TAG afe80cf2e5dc4aefe3b041adeb0230e61929bf12
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/sdbusplus"
BINARY_DIR "${CMAKE_BINARY_DIR}/libs/sdbusplus"
CONFIGURE_COMMAND
cd <SOURCE_DIR> && ./bootstrap.sh && ./configure --enable-transaction
-exec-prefix=<BINARY_DIR> --prefix=<BINARY_DIR>
BUILD_COMMAND cd <SOURCE_DIR> && make -j libsdbusplus.la
INSTALL_COMMAND cd <SOURCE_DIR> && make install
UPDATE_COMMAND "")
ExternalProject_Add(
nlohmann-json
GIT_REPOSITORY "https://github.com/nlohmann/json.git"
GIT_TAG f42a74b8f53cc308647123d49d33d1c8122e3f42
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/nlohmann-json"
BINARY_DIR "${CMAKE_BINARY_DIR}/libs/nlohmann-json"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -r "<SOURCE_DIR>/include" <BINARY_DIR>
UPDATE_COMMAND "")
ExternalProject_Add(
CLIUtils
GIT_REPOSITORY "https://github.com/CLIUtils/CLI11.git"
GIT_TAG 6ca5df8722738149d5db19727e26b2953975d317
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/CLIUtils"
BINARY_DIR "${CMAKE_BINARY_DIR}/libs/CLIUtils"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND cp -r "<SOURCE_DIR>/include" <BINARY_DIR>
UPDATE_COMMAND "")
ExternalProject_Add(
phosphor-logging
GIT_REPOSITORY "https://github.com/openbmc/phosphor-logging.git"
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/phosphor-logging"
BINARY_DIR "${CMAKE_BINARY_DIR}/libs/phosphor-logging"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
UPDATE_COMMAND "")
ExternalProject_Add(
libmctp-intel
GIT_REPOSITORY "ssh://git-amr-2.devtools.intel.com:29418/openbmc-libmctp"
GIT_TAG a8e37688ae769eeb269cf213f2a76451a7a8541a
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/libmctp"
INSTALL_DIR "${CMAKE_BINARY_DIR}/libs/libmctp"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
UPDATE_COMMAND "")
ExternalProject_Add(
gtest
GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/googletest"
INSTALL_DIR "${CMAKE_BINARY_DIR}/libs/googletest"
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
UPDATE_COMMAND "")
ExternalProject_Add(
phosphor-dbus-interfaces
GIT_REPOSITORY "https://github.com/openbmc/phosphor-dbus-interfaces.git"
GIT_TAG 4d01be9343158118a8d25cd7180991fc98755575
SOURCE_DIR "${CMAKE_BINARY_DIR}/src/phosphor-dbus-interfaces"
BINARY_DIR "${CMAKE_BINARY_DIR}/libs/phosphor-dbus-interfaces"
PATCH_COMMAND
git fetch
"https://gerrit.openbmc-project.xyz/openbmc/phosphor-dbus-interfaces"
refs/changes/39/30139/13 && git cherry-pick -n FETCH_HEAD
CONFIGURE_COMMAND
cd <SOURCE_DIR> && ./bootstrap.sh && export
SDBUSPLUSPLUS=${CMAKE_BINARY_DIR}/src/sdbusplus/tools/sdbus++ && export
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"${CMAKE_BINARY_DIR}/src/sdbusplus" &&
export SDBUSPLUS_CFLAGS=-I${CMAKE_BINARY_DIR}/src/sdbusplus && export
SDBUSPLUS_LIBS=-L${CMAKE_BINARY_DIR}/src/sdbusplus/.libs && ./configure
--exec-prefix=<BINARY_DIR> --prefix=<BINARY_DIR>
BUILD_COMMAND cd <SOURCE_DIR> && make
INSTALL_COMMAND cd <SOURCE_DIR> && make install
UPDATE_COMMAND "")
ExternalProject_Add_StepDependencies(phosphor-dbus-interfaces build
sdbusplus-project)
ExternalProject_Add_StepDependencies(libmctp-intel build gtest)