]> git.cworth.org Git - vogl/blob - src/vogleditor/CMakeLists.txt
UI: Add a settings file
[vogl] / src / vogleditor / CMakeLists.txt
1 project(vogleditor)
2 cmake_minimum_required(VERSION 2.8.9)
3
4 include("${SRC_DIR}/build_options.cmake")
5
6 if (NOT DEFINED ENV{QTDIR})
7 set(ENV{QTDIR} /usr/local/Trolltech/Qt-4.8.5)
8 endif()
9 find_package(Qt4 REQUIRED)
10
11 find_package(Threads REQUIRED)
12 find_package(X11 REQUIRED)
13
14 include_directories(
15     ${SRC_DIR}
16     ${SRC_DIR}/voglcore
17     ${SRC_DIR}/voglcommon
18     ${CMAKE_BINARY_DIR}/voglinc
19     ${SRC_DIR}/extlib/loki/include/loki
20     ${SRC_DIR}/libtelemetry
21     ${CMAKE_CURRENT_BINARY_DIR}
22     ${QT_INCLUDE_DIR}
23     ${QT_QTCORE_INCLUDE_DIR}
24     ${QT_QTGUI_INCLUDE_DIR}
25 )
26
27 #include(${QT_USE_FILE})
28
29 ## uncomment these to enable additional Qt modules
30 # set(QT_USE_QTNETWORK true)
31 # set(QT_USE_QTOPENGL true)
32 # set(QT_USE_QTSQL true)
33 # set(QT_USE_QTXML true)
34 # set(QT_USE_QTSVG true)
35 # set(QT_USE_QTTEST true)
36 # set(QT_USE_QTDBUS true)
37 # set(QT_USE_QTSCRIPT true)
38 # set(QT_USE_QTWEBKIT true)
39 # set(QT_USE_QTXMLPATTERNS true)
40 # set(QT_USE_PHONON true)
41
42 set(SRC_LIST
43     main.cpp
44     vogleditor.cpp
45     vogleditor_apicalltreeitem.cpp
46     vogleditor_apicalltimelinemodel.cpp
47     vogleditor_gl_state_snapshot.cpp
48     vogleditor_qapicalltreemodel.cpp
49     vogleditor_qframebufferexplorer.cpp
50     vogleditor_qprogramexplorer.cpp
51     vogleditor_qshaderexplorer.cpp
52     vogleditor_qstatetreemodel.cpp
53     vogleditor_qtextureexplorer.cpp
54     vogleditor_qtextureviewer.cpp
55     vogleditor_qtimelineview.cpp
56     vogleditor_qtrimdialog.cpp
57     vogleditor_settings.cpp
58     vogleditor_statetreearbprogramitem.cpp
59     vogleditor_statetreearbprogramenvitem.cpp
60     vogleditor_statetreebufferitem.cpp
61     vogleditor_statetreecontextgeneralitem.cpp
62     vogleditor_statetreecontextinfoitem.cpp
63     vogleditor_statetreecontextitem.cpp
64     vogleditor_statetreedisplaylistitem.cpp
65     vogleditor_statetreeframebufferitem.cpp
66     vogleditor_statetreeitem.cpp
67     vogleditor_statetreelightitem.cpp
68     vogleditor_statetreematrixitem.cpp
69     vogleditor_statetreepolygonstippleitem.cpp
70     vogleditor_statetreeprogramitem.cpp
71     vogleditor_statetreequeryitem.cpp
72     vogleditor_statetreerenderbufferitem.cpp
73     vogleditor_statetreesampleritem.cpp
74     vogleditor_statetreeshaderitem.cpp
75     vogleditor_statetreesyncitem.cpp
76     vogleditor_statetreetexenvitem.cpp
77     vogleditor_statetreetextureitem.cpp
78     vogleditor_statetreevertexarrayitem.cpp
79     vogleditor_timelineitem.cpp
80     vogleditor_timelinemodel.cpp
81     vogleditor_tracereplayer.cpp
82    )
83
84 # This should only contain headers that define a QOBJECT
85 # Typically that means just headers for UI objects
86 set(UI_HEADER_LIST
87     vogleditor.h
88     vogleditor_qapicalltreemodel.h
89     vogleditor_qframebufferexplorer.h
90     vogleditor_qprogramexplorer.h
91     vogleditor_qshaderexplorer.h
92     vogleditor_qstatetreemodel.h
93     vogleditor_qtextureviewer.h
94     vogleditor_qtextureexplorer.h
95     vogleditor_qtimelineview.h
96     vogleditor_qtrimdialog.h
97    )
98
99 # these are for non-QOBJECT headers
100 set(HEADER_LIST
101     vogleditor.h
102     vogleditor_apicallitem.h
103     vogleditor_apicalltimelinemodel.h
104     vogleditor_apicalltreeitem.h
105     vogleditor_frameitem.h
106     vogleditor_gl_state_snapshot.h
107     vogleditor_settings.h
108     vogleditor_snapshotitem.h
109     vogleditor_statetreearbprogramitem.h
110     vogleditor_statetreearbprogramenvitem.h
111     vogleditor_statetreebufferitem.h
112     vogleditor_statetreecontextgeneralitem.h
113     vogleditor_statetreecontextinfoitem.h
114     vogleditor_statetreecontextitem.h
115     vogleditor_statetreedisplaylistitem.h
116     vogleditor_statetreeitem.h
117     vogleditor_statetreelightitem.h
118     vogleditor_statetreematrixitem.h
119     vogleditor_statetreepolygonstippleitem.h
120     vogleditor_statetreeprogramitem.h
121     vogleditor_statetreequeryitem.h
122     vogleditor_statetreerenderbufferitem.h
123     vogleditor_statetreesampleritem.h
124     vogleditor_statetreeshaderitem.h
125     vogleditor_statetreesyncitem.h
126     vogleditor_statetreetexenvitem.h
127     vogleditor_statetreetextureitem.h
128     vogleditor_statetreevertexarrayitem.h
129     vogleditor_statetreeframebufferitem.h
130     vogleditor_timelineitem.h
131     vogleditor_timelinemodel.h
132     vogleditor_tracereplayer.h
133    )
134
135 set(FORM_LIST
136     vogleditor.ui
137     vogleditor_qframebufferexplorer.ui
138     vogleditor_qprogramexplorer.ui
139     vogleditor_qshaderexplorer.ui
140     vogleditor_qtextureexplorer.ui
141     vogleditor_qtrimdialog.ui
142    )
143
144 set(RESOURCE_LIST
145    )
146
147 QT4_WRAP_CPP(QT_GEN_HEADER_MOC_LIST ${UI_HEADER_LIST})
148 QT4_WRAP_UI(QT_GEN_FORM_HEADER_LIST ${FORM_LIST})
149 QT4_ADD_RESOURCES(QT_GEN_RESOURCE_RCC_LIST ${RESOURCE_LIST})
150
151 #add_definitions(${QT_DEFINITIONS})
152
153 add_executable(${PROJECT_NAME} ${SRC_LIST} ${HEADER_LIST}
154         ${QT_GEN_HEADER_MOC_LIST}
155         ${QT_GEN_FORM_HEADER_LIST}
156         ${QT_GEN_RESOURCE_RCC_LIST}
157    )
158
159 add_dependencies(${PROJECT_NAME} voglgen_make_inc)
160
161 target_link_libraries(${PROJECT_NAME}
162         ${QT_QTMAIN_LIBRARY} 
163         ${QT_QTCORE_LIBRARY} 
164         ${QT_QTGUI_LIBRARY} 
165         ${TELEMETRY_LIBRARY}
166         ${X11_X11_LIB}
167         backtrace
168         voglcommon
169     voglcore
170     ${CMAKE_DL_LIBS}
171    )
172
173 build_options_finalize()