Make overlay usage able to be disabled
As overlays require a kernel patch, make it able to be
disabled if a user wishes.
Change-Id: I174305435145bac67ad03f18f78c7eb985fbdc53
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f14f97f..cc49559 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,7 @@
add_definitions(-DBOOST_NO_TYPEID)
option(YOCTO "Enable Building in Yocto" OFF)
+option(USE_OVERLAYS "Enable Overlay Usage" ON)
if(NOT YOCTO)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/non-yocto)
@@ -100,6 +101,11 @@
target_link_libraries(entity-manager ${Boost_LIBRARIES})
target_link_libraries(entity-manager sdbusplus)
+if(USE_OVERLAYS)
+ # overlays can be disabled because they require a kernel patch as of today
+ target_compile_definitions(entity-manager PRIVATE OVERLAYS=1)
+endif()
+
if(NOT YOCTO)
add_dependencies(entity-manager nlohmann-json)
add_dependencies(fru-device sdbusplus)