Stop using old i2c-tools header

Update to using the new headers.

Closes #3

Tested-by: Still built

Change-Id: I80b8ec5a38ae0c2e8952387695f4a35516fe81e0
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9752096..684eb1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,29 +5,6 @@
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti")
 
-# check for necessary headers / download if missing
-enable_language (C)
-include (CheckIncludeFile)
-check_include_file ("linux/i2c-dev-user.h" header_present)
-if (NOT header_present)
-    message (
-        "Could not find linux/i2c-dev-user.h: Attempting to download locally "
-        "for building from https://raw.githubusercontent.com/openbmc/linux/"
-        "dev-4.13/include/uapi/linux/i2c-dev.h"
-    )
-
-    string (CONCAT url "https://raw.githubusercontent.com/openbmc/linux/"
-                   "dev-4.13/include/uapi/linux/i2c-dev.h")
-
-    file (DOWNLOAD ${url} "linux/i2c-dev-user.h" SHOW_PROGRESS STATUS status)
-
-    list (GET status 0 status_code)
-
-    if (NOT status_code EQUAL 0)
-        message (FATAL_ERROR "i2c-dev-user.h missing")
-    endif ()
-endif ()
-
 include_directories (${CMAKE_CURRENT_SOURCE_DIR})
 find_package (Boost REQUIRED)
 include_directories (${Boost_INCLUDE_DIRS})
@@ -57,7 +34,8 @@
 target_link_libraries (${PROJECT_NAME} boost_coroutine)
 target_link_libraries (${PROJECT_NAME} sdbusplus -lstdc++fs)
 target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES})
-target_link_libraries(${PROJECT_NAME} phosphor_logging)
+target_link_libraries (${PROJECT_NAME} phosphor_logging)
+target_link_libraries (${PROJECT_NAME} i2c)
 
 link_directories (${EXTERNAL_INSTALL_LOCATION}/lib)