Ed tanous | 7d95f5f | 2018-03-23 00:19:20 -0700 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.5) |
| 2 | |
| 3 | include(ExternalProject) |
| 4 | |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 5 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix) |
| 6 | file(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 |
| 13 | ExternalProject_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 tanous | 7d95f5f | 2018-03-23 00:19:20 -0700 | [diff] [blame] | 28 | ExternalProject_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 | |
| 40 | ExternalProject_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 Tanous | d425c6f | 2018-05-16 10:20:11 -0700 | [diff] [blame^] | 50 | |
| 51 | ExternalProject_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 | |
| 63 | ExternalProject_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 | ) |