-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
59 lines (40 loc) · 1.4 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
cmake_minimum_required(VERSION 2.8)
project(qat)
# Tell CMake to run moc when necessary:
#set(CMAKE_AUTOMOC ON)
# As moc files are generated in the binary dir, tell CMake to always look for includes there:
#set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Widgets finds its own dependencies.
#find_package(Qt5Widgets REQUIRED)
#add_executable(qxAdm main.cpp)
#qt5_use_modules(qxAdm Widgets)
#see http://www.kdab.com/using-cmake-with-qt-5/
#see http://doc-snapshot.qt-project.org/5.0/qtdoc/cmake-manual.html
#http://qt-project.org/quarterly/view/using_cmake_to_build_qt_projects
FIND_PACKAGE(Qt4 REQUIRED)
SET(qat_SOURCES
src/main.cpp
src/Catalog.cpp
src/TreeModel.cpp
src/ui/mainwindow.cpp
src/ui/OptionsDialog.cpp)
SET(qat_HEADERS
src/Catalog.h
src/TreeModel.h
src/TreeModelItem.h
src/ui/mainwindow.h
src/ui/OptionsDialog.h)
SET(qat_FORMS
src/ui/mainwindow.ui
src/ui/OptionsDialog.ui)
#SET(qat_RESOURCES qat.qrc)
QT4_WRAP_CPP(qat_HEADERS_MOC ${qat_HEADERS})
QT4_WRAP_UI(qat_FORMS_HEADERS ${qat_FORMS})
#QT4_ADD_RESOURCES(qat_RESOURCES_RCC ${qat_RESOURCES})
INCLUDE_DIRECTORIES(src)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
#LINK_DIRECTORIES(../deps/qjson/lib/)
ADD_EXECUTABLE(qat ${qat_SOURCES} ${qat_HEADERS_MOC} ${qat_FORMS_HEADERS} ${qat_RESOURCES_RCC})
TARGET_LINK_LIBRARIES(qat ${QT_LIBRARIES})