blob: 62fd89b94187cfe2224630c909abd4131e58a1a9 [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
9externalproject_add (sdbusplus-project PREFIX
10 ${CMAKE_BINARY_DIR}/sdbusplus-project GIT_REPOSITORY
11 https://github.com/openbmc/sdbusplus.git GIT_TAG
12 fac43a650e59e873688d5fc6e06b5bdc88ba0546 SOURCE_DIR
13 ${CMAKE_BINARY_DIR}/sdbusplus-src BINARY_DIR
14 ${CMAKE_BINARY_DIR}/sdbusplus-build CONFIGURE_COMMAND ""
15 BUILD_COMMAND cd ${CMAKE_BINARY_DIR}/sdbusplus-src &&
16 ./bootstrap.sh && ./configure --enable-transaction && make
17 -j libsdbusplus.la INSTALL_COMMAND "" LOG_DOWNLOAD ON)
Ed Tanousaa2e59c2018-04-12 12:17:20 -070018
Ed Tanousf0d73c22018-07-26 14:24:20 -070019externalproject_add (
20 tinyxml2 GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git GIT_TAG
21 8c8293ba8969a46947606a93ff0cb5a083aab47a CMAKE_ARGS SOURCE_DIR
22 "${CMAKE_BINARY_DIR}/tinyxml2-src" BINARY_DIR
23 "${CMAKE_BINARY_DIR}/tinyxml2-build" CMAKE_ARGS
24 -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/prefix
25)
Ed Tanousaa2e59c2018-04-12 12:17:20 -070026
Ed Tanousf0d73c22018-07-26 14:24:20 -070027externalproject_add (
28 gtest GIT_REPOSITORY "https://github.com/google/googletest.git" GIT_TAG
29 dfa853b63d17c787914b663b50c2095a0c5b706e CMAKE_ARGS
30 -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/googletest-build SOURCE_DIR
31 "${CMAKE_BINARY_DIR}/googletest-src" BINARY_DIR
32 "${CMAKE_BINARY_DIR}/googletest-build" CMAKE_ARGS
33 -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/prefix
34)
Ed tanous7d95f5f2018-03-23 00:19:20 -070035
Ed Tanous55c7b7a2018-05-22 15:27:24 -070036externalproject_add (
37 Boost URL
38 https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
39 URL_MD5 d275cd85b00022313c171f602db59fc5 SOURCE_DIR
Ed Tanousf0d73c22018-07-26 14:24:20 -070040 "${CMAKE_BINARY_DIR}/boost-src" BINARY_DIR "${CMAKE_BINARY_DIR}/boost-build"
41 CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND mkdir -p
42 "${CMAKE_BINARY_DIR}/prefix/include/" && cp -R
Ed Tanous55c7b7a2018-05-22 15:27:24 -070043 ${CMAKE_BINARY_DIR}/boost-src/boost ${CMAKE_BINARY_DIR}/prefix/include
Ed Tanousd425c6f2018-05-16 10:20:11 -070044)
45
Ed Tanousf0d73c22018-07-26 14:24:20 -070046externalproject_add (
47 nlohmann-json GIT_REPOSITORY "https://github.com/nlohmann/json.git" GIT_TAG
48 d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe SOURCE_DIR
49 "${CMAKE_BINARY_DIR}/nlohmann-json-src" BINARY_DIR
50 "${CMAKE_BINARY_DIR}/nlohmann-json-build" CONFIGURE_COMMAND "" BUILD_COMMAND
51 "" INSTALL_COMMAND mkdir -p "${CMAKE_BINARY_DIR}/prefix/include/nlohmann" &&
52 cp -r "${CMAKE_BINARY_DIR}/nlohmann-json-src/include/nlohmann"
53 "${CMAKE_BINARY_DIR}/prefix/include"
Ed Tanousd425c6f2018-05-16 10:20:11 -070054)