-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
41 lines (29 loc) · 908 Bytes
/
CMakeLists.txt
File metadata and controls
41 lines (29 loc) · 908 Bytes
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
cmake_minimum_required(VERSION 3.5)
project(v4l2-camera LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
include_directories(${CMAKE_SOURCE_DIR})
set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB SRC
"${SRC_DIR}/*.cpp"
"${SRC_DIR}/*.cxx"
"${SRC_DIR}/*.cc"
"${SRC_DIR}/*.c"
)
file(GLOB HEADERS
"${SRC_DIR}/*.h"
"${SRC_DIR}/*.hpp"
"${SRC_DIR}/*.hxx"
)
file(GLOB RES
"${SRC_DIR}/*.ui"
"${SRC_DIR}/*.qrc"
)
add_executable(${PROJECT_NAME} ${SRC} ${HEADERS} ${RES})
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets)