blob: 02a1104c84ebc66225b5059447e276efcb12b741 [file] [log] [blame]
Ed Tanous55c7b7a2018-05-22 15:27:24 -07001cmake_minimum_required (VERSION 3.5)
Ed tanous7d95f5f2018-03-23 00:19:20 -07002
Ed Tanous55c7b7a2018-05-22 15:27:24 -07003include (ExternalProject)
Ed tanous7d95f5f2018-03-23 00:19:20 -07004
Ed Tanous55c7b7a2018-05-22 15:27:24 -07005file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix)
6file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix/include)
Ed Tanousaa2e59c2018-04-12 12:17:20 -07007
James Feista975e9f2018-08-08 14:03:49 -07008# requires apt install autoconf-archive and autoconf
Ed Tanous90ad5ed2018-08-15 11:49:38 -07009externalproject_add (
10 sdbusplus-project PREFIX ${CMAKE_BINARY_DIR}/sdbusplus-project
11 GIT_REPOSITORY https://github.com/openbmc/sdbusplus.git GIT_TAG
Andrew Geisslerd2653042019-03-27 10:59:23 -050012 8cd7a4a10c02a450bc21580a4bde34328a841d13 SOURCE_DIR
Ed Tanous90ad5ed2018-08-15 11:49:38 -070013 ${CMAKE_BINARY_DIR}/sdbusplus-src BINARY_DIR
14 ${CMAKE_BINARY_DIR}/sdbusplus-build CONFIGURE_COMMAND "" BUILD_COMMAND cd
15 ${CMAKE_BINARY_DIR}/sdbusplus-src && ./bootstrap.sh && ./configure
16 --enable-transaction && make -j libsdbusplus.la INSTALL_COMMAND ""
17 LOG_DOWNLOAD ON
18)
Ed Tanousaa2e59c2018-04-12 12:17:20 -070019
Ed Tanousf0d73c22018-07-26 14:24:20 -070020externalproject_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 Tanousaa2e59c2018-04-12 12:17:20 -070027
Ed Tanousf0d73c22018-07-26 14:24:20 -070028externalproject_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 tanous7d95f5f2018-03-23 00:19:20 -070036
Ed Tanous55c7b7a2018-05-22 15:27:24 -070037externalproject_add (
38 Boost URL
Ed Tanous2f1ebcd2019-02-13 19:39:07 -080039 https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz
40 URL_MD5 b50944c0c13f81ce2c006802a1186f5a SOURCE_DIR
Ed Tanousf0d73c22018-07-26 14:24:20 -070041 "${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 Tanous55c7b7a2018-05-22 15:27:24 -070044 ${CMAKE_BINARY_DIR}/boost-src/boost ${CMAKE_BINARY_DIR}/prefix/include
Ed Tanousd425c6f2018-05-16 10:20:11 -070045)
46
Ed Tanousf0d73c22018-07-26 14:24:20 -070047externalproject_add (
48 nlohmann-json GIT_REPOSITORY "https://github.com/nlohmann/json.git" GIT_TAG
Jason M. Bills162be7b2018-11-06 11:02:35 -080049 aafad2be1f3cd259a1e79d2f6fcf267d1ede9ec7 SOURCE_DIR
Ed Tanousf0d73c22018-07-26 14:24:20 -070050 "${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 Tanousd425c6f2018-05-16 10:20:11 -070055)