]> git.cworth.org Git - vogl/blob - src/vogleditor/CMakeLists.txt
3132f70802318a7fc06560f2ee22163a1d8cf82f
[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_statetreearbprogramitem.cpp
58     vogleditor_statetreearbprogramenvitem.cpp
59     vogleditor_statetreebufferitem.cpp
60     vogleditor_statetreecontextgeneralitem.cpp
61     vogleditor_statetreecontextinfoitem.cpp
62     vogleditor_statetreecontextitem.cpp
63     vogleditor_statetreedisplaylistitem.cpp
64     vogleditor_statetreeframebufferitem.cpp
65     vogleditor_statetreeitem.cpp
66     vogleditor_statetreelightitem.cpp
67     vogleditor_statetreematrixitem.cpp
68     vogleditor_statetreepolygonstippleitem.cpp
69     vogleditor_statetreeprogramitem.cpp
70     vogleditor_statetreequeryitem.cpp
71     vogleditor_statetreerenderbufferitem.cpp
72     vogleditor_statetreesampleritem.cpp
73     vogleditor_statetreeshaderitem.cpp
74     vogleditor_statetreesyncitem.cpp
75     vogleditor_statetreetexenvitem.cpp
76     vogleditor_statetreetextureitem.cpp
77     vogleditor_statetreevertexarrayitem.cpp
78     vogleditor_timelineitem.cpp
79     vogleditor_timelinemodel.cpp
80     vogleditor_tracereplayer.cpp
81    )
82
83 # This should only contain headers that define a QOBJECT
84 # Typically that means just headers for UI objects
85 set(UI_HEADER_LIST
86     vogleditor.h
87     vogleditor_qapicalltreemodel.h
88     vogleditor_qframebufferexplorer.h
89     vogleditor_qprogramexplorer.h
90     vogleditor_qshaderexplorer.h
91     vogleditor_qstatetreemodel.h
92     vogleditor_qtextureviewer.h
93     vogleditor_qtextureexplorer.h
94     vogleditor_qtimelineview.h
95     vogleditor_qtrimdialog.h
96    )
97
98 # these are for non-QOBJECT headers
99 set(HEADER_LIST
100     vogleditor.h
101     vogleditor_apicallitem.h
102     vogleditor_apicalltimelinemodel.h
103     vogleditor_apicalltreeitem.h
104     vogleditor_frameitem.h
105     vogleditor_gl_state_snapshot.h
106     vogleditor_snapshotitem.h
107     vogleditor_statetreearbprogramitem.h
108     vogleditor_statetreearbprogramenvitem.h
109     vogleditor_statetreebufferitem.h
110     vogleditor_statetreecontextgeneralitem.h
111     vogleditor_statetreecontextinfoitem.h
112     vogleditor_statetreecontextitem.h
113     vogleditor_statetreedisplaylistitem.h
114     vogleditor_statetreeitem.h
115     vogleditor_statetreelightitem.h
116     vogleditor_statetreematrixitem.h
117     vogleditor_statetreepolygonstippleitem.h
118     vogleditor_statetreeprogramitem.h
119     vogleditor_statetreequeryitem.h
120     vogleditor_statetreerenderbufferitem.h
121     vogleditor_statetreesampleritem.h
122     vogleditor_statetreeshaderitem.h
123     vogleditor_statetreesyncitem.h
124     vogleditor_statetreetexenvitem.h
125     vogleditor_statetreetextureitem.h
126     vogleditor_statetreevertexarrayitem.h
127     vogleditor_statetreeframebufferitem.h
128     vogleditor_timelineitem.h
129     vogleditor_timelinemodel.h
130     vogleditor_tracereplayer.h
131    )
132
133 set(FORM_LIST
134     vogleditor.ui
135     vogleditor_qframebufferexplorer.ui
136     vogleditor_qprogramexplorer.ui
137     vogleditor_qshaderexplorer.ui
138     vogleditor_qtextureexplorer.ui
139     vogleditor_qtrimdialog.ui
140    )
141
142 set(RESOURCE_LIST
143    )
144
145 QT4_WRAP_CPP(QT_GEN_HEADER_MOC_LIST ${UI_HEADER_LIST})
146 QT4_WRAP_UI(QT_GEN_FORM_HEADER_LIST ${FORM_LIST})
147 QT4_ADD_RESOURCES(QT_GEN_RESOURCE_RCC_LIST ${RESOURCE_LIST})
148
149 #add_definitions(${QT_DEFINITIONS})
150
151 add_executable(${PROJECT_NAME} ${SRC_LIST} ${HEADER_LIST}
152         ${QT_GEN_HEADER_MOC_LIST}
153         ${QT_GEN_FORM_HEADER_LIST}
154         ${QT_GEN_RESOURCE_RCC_LIST}
155    )
156
157 add_dependencies(${PROJECT_NAME} voglgen_make_inc)
158
159 target_link_libraries(${PROJECT_NAME}
160         ${QT_QTMAIN_LIBRARY} 
161         ${QT_QTCORE_LIBRARY} 
162         ${QT_QTGUI_LIBRARY} 
163         ${TELEMETRY_LIBRARY}
164         ${X11_X11_LIB}
165         backtrace
166         voglcommon
167     voglcore
168     ${CMAKE_DL_LIBS}
169    )
170
171 build_options_finalize()