From 0a07fb2e67003144f54362aee9c07cb71f13e1df Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Thu, 2 Jun 2016 11:43:22 +0200 Subject: Start using new implementation of thor protocol Drop all legacy stuff which used cdc-acm kernel driver and start using new implementation provided by libthor. Change-Id: If3ee224b4905778d39c8b049f38353f499cd9f9f Signed-off-by: Krzysztof Opasiak --- CMakeLists.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fda3bcf..c667871 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,19 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(lthor C) +SET(LIBTHOR_SRCS + libthor/thor_acm.c + libthor/thor.c + libthor/thor_raw_file.c + libthor/thor_tar.c + libthor/thor_usb.c +) + SET(SRCS lthor.c ) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/.) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libthor) SET(VENDOR "samsung") SET(PACKAGE ${PROJECT_NAME}) @@ -25,6 +33,7 @@ MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED libarchive + libusb-1.0>=1.0.17 ) FOREACH(flag ${pkgs_CFLAGS}) @@ -45,12 +54,16 @@ ADD_DEFINITIONS("-DPACKAGE_VERSION=\"${PACKAGE_VERSION}\"") #SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") IF(APPLE) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") + INCLUDE_DIRECTORIES("/usr/include/machine") ELSE() SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") ENDIF() +ADD_LIBRARY(libthor ${LIBTHOR_SRCS}) + ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}) + +TARGET_LINK_LIBRARIES(${PROJECT_NAME} libthor ${pkgs_LDFLAGS}) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) -- cgit v1.2.3