aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-19 00:55:42 -0500
committerLeandro Pereira <leandro@hardinfo.org>2017-07-19 07:20:40 -0700
commit9b2982813bdb1241e2149bd48893d03e139d24bb (patch)
tree613fb1becf462956dace385c60294a8e816714f2 /CMakeLists.txt
parentaf68d862d46e0bdc2d3d32a2fe5fba53456072cb (diff)
device tree: reworked and cleaned up
* Moved device tree functions to modules/devices/devicetree/dt_util.c * The dtr_* functions usable from outside devicetree.c, for example in get_motherboard(). Must #include "dt_util.h" * Now possible to use an alternate device tree root for testing -DOVRDTRROOT=\"/some/path\" * Alternately, pass dtr_new() an alternate base path. * Abandoned the tuple grouping and inherited properties stuff for now. Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa146e8c..765c8c89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,7 @@ set(HARDINFO_VERSION "0.6-alpha")
option(HARDINFO_NOSYNC "Disable database sync via libsoup" 1)
set(OVRARCH "" CACHE STRING "Override HARDINFO_ARCH value")
set(OVRCPUINFO "" CACHE STRING "Specify a different file for /proc/cpuinfo")
+set(OVRDTRROOT "" CACHE STRING "Specify a different path for /proc/device-tree")
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
include(GNUInstallDirs)
@@ -58,6 +59,10 @@ if (OVRCPUINFO)
add_definitions(-DPROC_CPUINFO=${OVRCPUINFO})
message(STATUS "/proc/cpuinfo override: ${OVRCPUINFO}")
endif()
+if (OVRDTRROOT)
+ add_definitions(-DDTR_ROOT=${OVRDTRROOT})
+ message(STATUS "/proc/device-tree override: ${OVRDTRROOT}")
+endif()
add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale")
message(STATUS "LOCALEDIR = ${CMAKE_INSTALL_PREFIX}/share/locale")
@@ -125,6 +130,7 @@ set(MODULE_devices_SOURCES
modules/devices/devmemory.c
modules/devices/dmi.c
modules/devices/devicetree.c
+ modules/devices/devicetree/dt_util.c
modules/devices/inputdevices.c
modules/devices/pci.c
modules/devices/printers.c