Ed Tanous | 55c7b7a | 2018-05-22 15:27:24 -0700 | [diff] [blame] | 1 | cmake_minimum_required (VERSION 3.5) |
Ed tanous | 7d95f5f | 2018-03-23 00:19:20 -0700 | [diff] [blame] | 2 | |
Ed Tanous | 55c7b7a | 2018-05-22 15:27:24 -0700 | [diff] [blame] | 3 | include (ExternalProject) |
Ed tanous | 7d95f5f | 2018-03-23 00:19:20 -0700 | [diff] [blame] | 4 | |
Ed Tanous | 55c7b7a | 2018-05-22 15:27:24 -0700 | [diff] [blame] | 5 | file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix) |
| 6 | file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix/include) |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 7 | |
James Feist | a975e9f | 2018-08-08 14:03:49 -0700 | [diff] [blame] | 8 | # requires apt install autoconf-archive and autoconf |
Ed Tanous | 90ad5ed | 2018-08-15 11:49:38 -0700 | [diff] [blame] | 9 | externalproject_add ( |
| 10 | sdbusplus-project PREFIX ${CMAKE_BINARY_DIR}/sdbusplus-project |
| 11 | GIT_REPOSITORY https://github.com/openbmc/sdbusplus.git GIT_TAG |
Patrick Williams | 3d83380 | 2020-06-01 07:14:39 -0500 | [diff] [blame] | 12 | fa3137a78e952134559bf7c41c4f29fa4afabe02 SOURCE_DIR |
Ed Tanous | 90ad5ed | 2018-08-15 11:49:38 -0700 | [diff] [blame] | 13 | ${CMAKE_BINARY_DIR}/sdbusplus-src BINARY_DIR |
| 14 | ${CMAKE_BINARY_DIR}/sdbusplus-build CONFIGURE_COMMAND "" BUILD_COMMAND cd |
Patrick Williams | 3d83380 | 2020-06-01 07:14:39 -0500 | [diff] [blame] | 15 | ${CMAKE_BINARY_DIR}/sdbusplus-src && meson build -Ddefault_library=static |
| 16 | && ninja -C build libsdbusplus.a INSTALL_COMMAND "" |
Ed Tanous | 90ad5ed | 2018-08-15 11:49:38 -0700 | [diff] [blame] | 17 | LOG_DOWNLOAD ON |
| 18 | ) |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 19 | |
Ed Tanous | f0d73c2 | 2018-07-26 14:24:20 -0700 | [diff] [blame] | 20 | externalproject_add ( |
| 21 | tinyxml2 GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git GIT_TAG |
| 22 | 8c8293ba8969a46947606a93ff0cb5a083aab47a CMAKE_ARGS SOURCE_DIR |
| 23 | "${CMAKE_BINARY_DIR}/tinyxml2-src" BINARY_DIR |
| 24 | "${CMAKE_BINARY_DIR}/tinyxml2-build" CMAKE_ARGS |
| 25 | -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/prefix |
| 26 | ) |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 27 | |
Ed Tanous | f0d73c2 | 2018-07-26 14:24:20 -0700 | [diff] [blame] | 28 | externalproject_add ( |
| 29 | gtest GIT_REPOSITORY "https://github.com/google/googletest.git" GIT_TAG |
| 30 | dfa853b63d17c787914b663b50c2095a0c5b706e CMAKE_ARGS |
| 31 | -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/googletest-build SOURCE_DIR |
| 32 | "${CMAKE_BINARY_DIR}/googletest-src" BINARY_DIR |
| 33 | "${CMAKE_BINARY_DIR}/googletest-build" CMAKE_ARGS |
| 34 | -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/prefix |
| 35 | ) |
Ed tanous | 7d95f5f | 2018-03-23 00:19:20 -0700 | [diff] [blame] | 36 | |
Ed Tanous | 55c7b7a | 2018-05-22 15:27:24 -0700 | [diff] [blame] | 37 | externalproject_add ( |
| 38 | Boost URL |
Manojkiran Eda | c6bfcfc | 2020-06-14 10:44:11 +0530 | [diff] [blame] | 39 | https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz |
| 40 | URL_MD5 4036cd27ef7548b8d29c30ea10956196 SOURCE_DIR |
Ed Tanous | f0d73c2 | 2018-07-26 14:24:20 -0700 | [diff] [blame] | 41 | "${CMAKE_BINARY_DIR}/boost-src" BINARY_DIR "${CMAKE_BINARY_DIR}/boost-build" |
| 42 | CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND mkdir -p |
| 43 | "${CMAKE_BINARY_DIR}/prefix/include/" && cp -R |
Ed Tanous | 55c7b7a | 2018-05-22 15:27:24 -0700 | [diff] [blame] | 44 | ${CMAKE_BINARY_DIR}/boost-src/boost ${CMAKE_BINARY_DIR}/prefix/include |
Ed Tanous | d425c6f | 2018-05-16 10:20:11 -0700 | [diff] [blame] | 45 | ) |
| 46 | |
Ed Tanous | f0d73c2 | 2018-07-26 14:24:20 -0700 | [diff] [blame] | 47 | externalproject_add ( |
| 48 | nlohmann-json GIT_REPOSITORY "https://github.com/nlohmann/json.git" GIT_TAG |
James Feist | e284a7c | 2019-11-20 16:20:23 -0800 | [diff] [blame] | 49 | ea60d40f4a60a47d3be9560d8f7bc37c163fe47b SOURCE_DIR |
Ed Tanous | f0d73c2 | 2018-07-26 14:24:20 -0700 | [diff] [blame] | 50 | "${CMAKE_BINARY_DIR}/nlohmann-json-src" BINARY_DIR |
| 51 | "${CMAKE_BINARY_DIR}/nlohmann-json-build" CONFIGURE_COMMAND "" BUILD_COMMAND |
| 52 | "" INSTALL_COMMAND mkdir -p "${CMAKE_BINARY_DIR}/prefix/include/nlohmann" && |
| 53 | cp -r "${CMAKE_BINARY_DIR}/nlohmann-json-src/include/nlohmann" |
| 54 | "${CMAKE_BINARY_DIR}/prefix/include" |
Ed Tanous | d425c6f | 2018-05-16 10:20:11 -0700 | [diff] [blame] | 55 | ) |
James Feist | 5a7e877 | 2020-07-22 09:08:38 -0700 | [diff] [blame] | 56 | |
| 57 | externalproject_add ( |
| 58 | Boost-URL GIT_REPOSITORY "https://github.com/CPPAlliance/url.git" GIT_TAG |
| 59 | a56ae0df6d3078319755fbaa67822b4fa7fd352b SOURCE_DIR |
| 60 | "${CMAKE_BINARY_DIR}/boost-url-src" BINARY_DIR |
| 61 | "${CMAKE_BINARY_DIR}/boost-url-build" CONFIGURE_COMMAND "" BUILD_COMMAND |
| 62 | "" INSTALL_COMMAND mkdir -p "${CMAKE_BINARY_DIR}/prefix/include" && |
| 63 | cp -r "${CMAKE_BINARY_DIR}/boost-url-src/include/boost" |
| 64 | "${CMAKE_BINARY_DIR}/prefix/include" |
| 65 | ) |