summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2016-06-02 11:43:22 +0200
committerKrzysztof Opasiak <k.opasiak@samsung.com>2016-07-07 17:08:54 +0200
commit0a07fb2e67003144f54362aee9c07cb71f13e1df (patch)
tree65380fddf183337ce08a49f8f264a865bd84ef61 /CMakeLists.txt
parent53962dff18df52bcc99c0193dd0c31a49d172875 (diff)
downloadlthor-0a07fb2e67003144f54362aee9c07cb71f13e1df.tar.gz
lthor-0a07fb2e67003144f54362aee9c07cb71f13e1df.tar.bz2
lthor-0a07fb2e67003144f54362aee9c07cb71f13e1df.zip
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 <k.opasiak@samsung.com>
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt17
1 files changed, 15 insertions, 2 deletions
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})