blob: 8e39d9b4e9b96546396a78bae877e4069e52a77d [file] [log] [blame]
Ed tanous7d95f5f2018-03-23 00:19:20 -07001cmake_minimum_required(VERSION 3.5)
2
3include(ExternalProject)
4
Ed Tanousaa2e59c2018-04-12 12:17:20 -07005file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix)
6file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix/include)
7
8
9# add back GIT_TAG in with the correct SHA1 once
10# https://gerrit.openbmc-project.xyz/#/c/10278/ is merged
11#GIT_TAG
12#2a3af936625bc66cfc6bae1952b57138f141377e
13ExternalProject_Add(
14 sdbusplus
15 GIT_REPOSITORY
16 "https://gerrit.openbmc-project.xyz/openbmc/sdbusplus"
17 GIT_TAG
18 fce038ad5ac9f458b03d55b441253a9c05dadc3e
19 SOURCE_DIR "${CMAKE_BINARY_DIR}/sdbusplus-src"
20 BINARY_DIR "${CMAKE_BINARY_DIR}/sdbusplus-build"
21 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/prefix
22 CONFIGURE_COMMAND ""
23 BUILD_COMMAND ""
24 INSTALL_COMMAND cp -r "${CMAKE_BINARY_DIR}/sdbusplus-src/sdbusplus"
25 "${CMAKE_BINARY_DIR}/prefix/include"
26)
27
Ed tanous7d95f5f2018-03-23 00:19:20 -070028ExternalProject_Add(
29 tinyxml2
30 GIT_REPOSITORY
31 "https://github.com/leethomason/tinyxml2.git"
32 GIT_TAG
33 8c8293ba8969a46947606a93ff0cb5a083aab47a
34 CMAKE_ARGS
35 SOURCE_DIR "${CMAKE_BINARY_DIR}/tinyxml2-src"
36 BINARY_DIR "${CMAKE_BINARY_DIR}/tinyxml2-build"
37 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/prefix
38)
39
40ExternalProject_Add(
41 Boost
42 URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
43 URL_MD5 d275cd85b00022313c171f602db59fc5
44 SOURCE_DIR "${CMAKE_BINARY_DIR}/boost-src"
45 BINARY_DIR "${CMAKE_BINARY_DIR}/boost-build"
46 CONFIGURE_COMMAND ""
47 BUILD_COMMAND ""
48 INSTALL_COMMAND mkdir -p "${CMAKE_BINARY_DIR}/prefix/include/" && cp -R ${CMAKE_BINARY_DIR}/boost-src/boost ${CMAKE_BINARY_DIR}/prefix/include
49)
Ed Tanousd425c6f2018-05-16 10:20:11 -070050
51ExternalProject_Add(
52 gtest
53 GIT_REPOSITORY
54 "https://github.com/google/googletest.git"
55 GIT_TAG
56 dfa853b63d17c787914b663b50c2095a0c5b706e
57 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/googletest-build
58 SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
59 BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
60 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/prefix
61)
62
63ExternalProject_Add(
64 nlohmann-json
65 GIT_REPOSITORY
66 "https://github.com/nlohmann/json.git"
67 GIT_TAG
68 d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe
69 SOURCE_DIR "${CMAKE_BINARY_DIR}/nlohmann-json-src"
70 BINARY_DIR "${CMAKE_BINARY_DIR}/nlohmann-json-build"
71 CONFIGURE_COMMAND ""
72 BUILD_COMMAND ""
73 INSTALL_COMMAND mkdir -p "${CMAKE_BINARY_DIR}/prefix/include/nlohmann" &&
74 cp -r "${CMAKE_BINARY_DIR}/nlohmann-json-src/include/nlohmann"
75 "${CMAKE_BINARY_DIR}/prefix/include"
76
77)