cmake: fix externalproject for latest host-ipmid
phosphor-host-ipmid did a conversion to meson but our externalproject
implementation was not updated correspondingly. Fix that up now and
do a minor header path change necessary per the latest upstream code.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8cfe67a61d14e71b4cad217e13cac2030b707bd3
diff --git a/CMakeLists.txt.in b/CMakeLists.txt.in
index f50f74d..7ab2fc7 100644
--- a/CMakeLists.txt.in
+++ b/CMakeLists.txt.in
@@ -5,27 +5,25 @@
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix)
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix/include)
-# requires apt install autoconf-archive and autoconf
+externalproject_add (host-ipmid
+ PREFIX ${CMAKE_BINARY_DIR}/prefix
+ GIT_REPOSITORY https://github.com/openbmc/phosphor-host-ipmid
+ SOURCE_DIR ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src
-externalproject_add (
- host-ipmid PREFIX ${CMAKE_BINARY_DIR}/phosphor-host-ipmid GIT_REPOSITORY
- https://github.com/openbmc/phosphor-host-ipmid SOURCE_DIR
- ${CMAKE_BINARY_DIR}/phosphor-ipmi-host-src BINARY_DIR
- ${CMAKE_BINARY_DIR}/phosphor-ipmi-host-build CONFIGURE_COMMAND cd
- ${CMAKE_BINARY_DIR}/phosphor-ipmi-host-src && export
- PYTHONPATH=${CMAKE_BINARY_DIR}/prefix/lib/python2.7/site-packages:$ENV{PYTHONPATH}
- && export PATH=${CMAKE_BINARY_DIR}/prefix/bin:$ENV{PATH} && export
- PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/prefix/lib/pkgconfig && ./bootstrap.sh
- && ./configure --prefix=${CMAKE_BINARY_DIR}/prefix
- CPPFLAGS=-I${CMAKE_BINARY_DIR}/prefix/include/
- CXXFLAGS=-Wno-error=unused-result LDFLAGS=-L${CMAKE_BINARY_DIR}/prefix/lib/
- BUILD_COMMAND cd ${CMAKE_BINARY_DIR}/phosphor-ipmi-host-src && export
- PYTHONPATH=${CMAKE_BINARY_DIR}/prefix/lib/python2.7/site-packages:$ENV{PYTHONPATH}
- && export PATH=${CMAKE_BINARY_DIR}/prefix/bin:$ENV{PATH} && export
- PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/prefix/lib/pkgconfig && make -j
- verbose=1 INSTALL_COMMAND cd ${CMAKE_BINARY_DIR}/phosphor-ipmi-host-src &&
- make install && mkdir -p
- "${CMAKE_BINARY_DIR}/prefix/include/ipmid" && cp include/ipmid/api.h
- "${CMAKE_BINARY_DIR}/prefix/include/ipmid/" LOG_DOWNLOAD ON
+ CONFIGURE_COMMAND
+ cd ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src &&
+ meson build
+ --prefix=${CMAKE_BINARY_DIR}/prefix
+ --libdir=${CMAKE_BINARY_DIR}/prefix/lib
+
+ BUILD_COMMAND
+ cd ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src/build &&
+ meson compile
+
+ INSTALL_COMMAND
+ cd ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src/build &&
+ meson install
+
+ LOG_DOWNLOAD ON
)
diff --git a/include/usb-dbg.hpp b/include/usb-dbg.hpp
index 608ee41..a927242 100644
--- a/include/usb-dbg.hpp
+++ b/include/usb-dbg.hpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/stat.h>