fix external dependency for ci build

The external dependency on phosphor-ipmi-host has changed
from autotools to meson, so the cmake blurb to build it
as an external project needs to change too.

This also removes the pinned version of ipmid

Tested: checked out unit-test scripts and built it locally

Change-Id: I82021cf401c7db134c45cd5d700753bc6fde8c55
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4aa0f03..ee58258 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,12 @@
 add_definitions (-Wno-psabi)
 
 if (NOT YOCTO) # headers that can't be built without yocto
+
+    execute_process(
+        COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
+        OUTPUT_VARIABLE TRIPLE OUTPUT_STRIP_TRAILING_WHITESPACE)
+    message(STATUS "Target triple: ${TRIPLE}")
+
     include_directories (SYSTEM non-yocto)
 
     configure_file (CMakeLists.txt.in 3rdparty/CMakeLists.txt)
@@ -43,6 +49,7 @@
     set (CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/prefix ${CMAKE_PREFIX_PATH})
     include_directories (SYSTEM ${CMAKE_BINARY_DIR}/prefix/include)
     link_directories (${CMAKE_BINARY_DIR}/prefix/lib)
+    link_directories (${CMAKE_BINARY_DIR}/prefix/lib/${TRIPLE})
 
     include_directories (SYSTEM ${CMAKE_BINARY_DIR}/sdbusplus-src)
     link_directories (${CMAKE_BINARY_DIR}/sdbusplus-src/.libs)