-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
44 lines (37 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
cmake_minimum_required(VERSION 3.3)
project(PlateRecognition)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
include_directories(include)
include_directories(/usr/local/mysql/include)
include_directories(
src/dialogs src/tools src/model src/ui src/widgets src
)
include_directories(/usr/local/include/mysql)
link_directories(/usr/local/mysql/lib)
link_directories(/usr/local/lib)
link_directories(lib)
include_directories(${OpenCV_INCLUDE_DIRS})
find_package(OpenCV REQUIRED)
# Find includes in corresponding build directories
# Find the QtWidgets library
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Network REQUIRED)
# sub directories
add_subdirectory(thirdparty)
aux_source_directory(src/tools SOURCE_DIR)
aux_source_directory(src/dialogs SOURCE_DIR)
aux_source_directory(src/ui SOURCE_DIR)
aux_source_directory(src/widgets SOURCE_DIR)
aux_source_directory(src/model SOURCE_DIR)
set(LOCAL_LIBS mysqlcppconn m mysqlclient z libeasypr.a libqiniu.dylib ${OpenCV_LIBS} Qt5::Widgets Qt5::Core Qt5::Network thirdparty)
add_executable(${PROJECT_NAME} ${SOURCE_DIR} src/main.cpp )
target_link_libraries(${PROJECT_NAME} ${LOCAL_LIBS})
add_executable(MySQLTest ${SOURCE_DIR} test/mysql_test.cpp)
target_link_libraries(MySQLTest ${LOCAL_LIBS})
add_executable(QiniuTest ${SOURCE_DIR} test/qiniu_test.cpp)
target_link_libraries(QiniuTest ${LOCAL_LIBS})