diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d1a438c..7cd2a5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,17 @@ # project(O-3000-Driver) -cmake_minimum_required(VERSION 2.4) + +cmake_minimum_required(VERSION 3.0) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) +# library version definition +set(VERSION_MAJOR "2") +set(VERSION_MINOR "0") +set(VERSION_RELEASE "3") +set(VERSION_STR "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}") +add_definitions(-DO3000_VERSION="${VERSION_STR}") + # find libusb library (version 1.0.19 or higher is needed!) find_package(LibUSB REQUIRED) @@ -21,11 +29,11 @@ add_library( o3000 SHARED set_target_properties ( o3000 PROPERTIES OUTPUT_NAME "o3000" - VERSION 2.0.2 - SOVERSION 2 + VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}" + SOVERSION ${VERSION_MAJOR} LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" ) - + target_compile_options(o3000 PRIVATE -Wall -g -ggdb -O3 -fPIC) target_link_libraries(o3000 pthread ${LIBUSB_LIBRARIES}) |