-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (47 loc) · 1.5 KB
/
CMakeLists.txt
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
cmake_minimum_required(VERSION 3.24)
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0)
project(rusokucan
DESCRIPTION "Qt can bus plugin for Rusoku TouCAN adapters"
HOMEPAGE_URL "https://www.rusoku.com"
LANGUAGES CXX C
)
set(QT_USE_FIXED_QT_ADD_RESOURCE_BASE TRUE)
#set(CMAKE_MAKE_PROGRAM "ninja")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
set(CMAKE_OSX_ARCHITECTURES x86_64)
set(CMAKE_PREFIX_PATH "~/Qt/5.15.2/clang_64"
"C:/Qt/5.15.2/msvc2019_64")
find_package(Qt5 COMPONENTS
Core
SerialBus
REQUIRED)
set(SOURCE_FILES
main.cpp
rusokucanbackend.cpp
rusokucanbackend_p.cpp)
set(HEADERS_FILES
rusokucanbackend.h
rusokucanbackend_p.h
rusoku_symbols_p.h
#can_api.h)
set(OTHER_FILES
plugin.json)
add_library(rusokucan SHARED ${SOURCE_FILES} ${HEADERS_FILES} ${OTHER_FILES})
target_link_libraries(rusokucan
Qt5::Core
Qt5::SerialBus)
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_compile_definitions(rusokucan QT_DEBUG)
else()
add_compile_definitions(rusokucan QT_NO_DEBUG)
add_compile_definitions(rusokucan QT_NO_DEBUG_OUTPUT)
endif()
set_property(TARGET rusokucan PROPERTY MACHO_CURRENT_VERSION 1.0.0)
#set_property(TARGET rusokucan PROPERTY MACHO_COMPATABILITY_VERSION 1.0.0)
set_property(TARGET rusokucan PROPERTY VERSION 1.0.0)