aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: d1a438c4d8abc629c8e6cd1b471b0fb65cf47a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# O-3000 driver
#

project(O-3000-Driver)
cmake_minimum_required(VERSION 2.4)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)

# find libusb library (version 1.0.19 or higher is needed!)
find_package(LibUSB REQUIRED)

include_directories(.)
include_directories(${LIBUSB_INCLUDE_DIRS})

add_library(				o3000 SHARED
							o3000.c
							o3000_private.h
							o3000_xfer_handler.c
							o3000_xfer_handler.h
							)

set_target_properties	(	o3000 PROPERTIES
							OUTPUT_NAME "o3000"
							VERSION 2.0.2
							SOVERSION 2
							LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
						)
						
target_compile_options(o3000 PRIVATE -Wall -g -ggdb -O3 -fPIC)
target_link_libraries(o3000 pthread ${LIBUSB_LIBRARIES})

install(TARGETS o3000 DESTINATION lib)
install(FILES "o3000.h" "o3000_portable.h" "image_header.h" DESTINATION "include/o3000")