aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPatrick Roth <roth@stettbacher.ch>2019-10-04 10:17:42 +0200
committerPatrick Roth <roth@stettbacher.ch>2019-10-04 10:17:42 +0200
commite60ccb8965bbc1a460bf85bfc87b885cf1260151 (patch)
tree5b0564272b5c0637c69edc8e074a6b9e5319c57f /CMakeLists.txt
downloado3000-driver-e60ccb8965bbc1a460bf85bfc87b885cf1260151.tar.gz
o3000-driver-e60ccb8965bbc1a460bf85bfc87b885cf1260151.zip
Initial commit
import from github
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..074bf52
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,32 @@
+#
+# 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(DIRECTORY ../../include/o3000 DESTINATION include FILES_MATCHING PATTERN "*.h*")