1 cmake_minimum_required (VERSION 2.8)
6 ##############################################################################
9 # On Mac OS X build fat binaries with i386 and x86_64 architectures by default.
10 if (APPLE AND NOT CMAKE_OSX_ARCHITECTURES)
11 set (CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
14 # We use a cached string variable instead of the standard (boolean) OPTION
15 # command so that we can default to auto-detecting optional depencies, while
16 # still providing a mechanism to force/disable these optional dependencies, as
17 # prescribed in http://www.gentoo.org/proj/en/qa/automagic.xml
18 set (ENABLE_GUI "AUTO" CACHE STRING "Enable Qt GUI.")
20 set (ENABLE_EGL "AUTO" CACHE STRING "Enable EGL support.")
23 ##############################################################################
26 include (FindPkgConfig)
28 set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
30 set (CMAKE_USE_PYTHON_VERSION 2.7 2.6)
32 find_package (PythonInterp REQUIRED)
33 find_package (OpenGL REQUIRED)
36 if (NOT (ENABLE_GUI STREQUAL "AUTO"))
37 set (REQUIRE_GUI REQUIRED)
39 find_package (Qt4 4.7 COMPONENTS QtCore QtGui QtWebKit ${REQUIRE_GUI})
40 find_package (QJSON ${REQUIRE_GUI})
43 include_directories (${OPENGL_INCLUDE_DIR})
46 find_package (DirectX)
52 include_directories (${X11_INCLUDE_DIR})
53 add_definitions (-DHAVE_X11)
57 if (NOT ENABLE_EGL STREQUAL "AUTO")
58 set (REQUIRE_EGL REQUIRED)
60 pkg_check_modules (EGL egl glesv1_cm glesv2 ${REQUIRE_EGL})
62 include_directories (${EGL_INCLUDE_DIR})
63 add_definitions (-DHAVE_EGL)
71 ##############################################################################
72 # Set global build options
74 include (CheckCXXCompilerFlag)
77 # MSVC & MinGW only define & use APIENTRY
78 add_definitions (-DGLAPIENTRY=__stdcall)
80 # http://msdn.microsoft.com/en-us/library/aa383745.aspx
81 add_definitions (-D_WIN32_WINNT=0x0500 -DWINVER=0x0500)
83 CHECK_CXX_COMPILER_FLAG("-fvisibility=hidden" CXX_COMPILER_FLAG_VISIBILITY)
84 if (CXX_COMPILER_FLAG_VISIBILITY)
85 add_definitions ("-fvisibility=hidden")
86 endif (CXX_COMPILER_FLAG_VISIBILITY)
90 # C99 includes for msvc
91 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/msvc)
93 # Enable math constants defines
94 add_definitions (-D_USE_MATH_DEFINES)
97 add_definitions (-DNOMINMAX)
100 add_definitions (-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS)
101 add_definitions (-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
102 add_definitions (-W4)
103 add_definitions (-wd4063) # not a valid value for switch of enum
104 add_definitions (-wd4127) # conditional expression is constant
105 add_definitions (-wd4244) # conversion from 'type1' to 'type2', possible loss of data
106 add_definitions (-wd4505) # unreferenced local function has been removed
107 add_definitions (-wd4800) # forcing value to bool 'true' or 'false' (performance warning)
108 # XXX: it's safer to use ssize_t everywhere instead of disabling warning
109 add_definitions (-wd4018) # signed/unsigned mismatch
112 # http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
114 CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
115 CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
117 if (${flag_var} MATCHES "/MD")
118 string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
119 endif (${flag_var} MATCHES "/MD")
120 endforeach (flag_var)
123 add_definitions (-Wall)
124 # XXX: it's safer to use ssize_t everywhere instead of disabling warning
125 add_definitions (-Wno-sign-compare) # comparison between signed and unsigned integer expressions
129 # Avoid depending on MinGW runtime DLLs
130 check_cxx_compiler_flag (-static-libgcc HAVE_STATIC_LIBGCC_FLAG)
131 if (HAVE_STATIC_LIBGCC_FLAG)
132 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc")
133 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc")
134 set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libgcc")
136 check_cxx_compiler_flag (-static-libstdc++ HAVE_STATIC_LIBSTDCXX_FLAG)
137 if (HAVE_STATIC_LIBSTDCXX_FLAG)
138 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
139 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++")
140 set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libstdc++")
145 # Put all executables into the same top level build directory, regardless of
146 # which subdirectory they are declared
147 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
150 ##############################################################################
151 # Bundled dependencies
153 # We always use the bundled zlib, libpng, and snappy sources:
154 # - on Windows to make it easy to deploy the wrappers DLLs
155 # - on unices to prevent symbol collisions when tracing applications that link
156 # against other versions of these libraries
158 set (ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib)
159 set (ZLIB_LIBRARIES z_bundled)
160 add_subdirectory (thirdparty/zlib EXCLUDE_FROM_ALL)
162 include_directories (${ZLIB_INCLUDE_DIRS})
163 link_libraries (${ZLIB_LIBRARIES})
165 set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy)
166 set (SNAPPY_LIBRARIES snappy_bundled)
167 add_subdirectory (thirdparty/snappy EXCLUDE_FROM_ALL)
169 include_directories (${SNAPPY_INCLUDE_DIRS})
170 link_libraries (${SNAPPY_LIBRARIES})
172 set (PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng)
173 set (PNG_DEFINITIONS "")
174 set (PNG_LIBRARIES png_bundled)
176 add_subdirectory (thirdparty/libpng EXCLUDE_FROM_ALL)
177 include_directories (${PNG_INCLUDE_DIR})
178 add_definitions (${PNG_DEFINITIONS})
179 link_libraries (${PNG_LIBRARIES})
181 # The Qt website provides binaries for Windows and MacOSX, and they are
182 # automatically found by cmake without any manual intervention. The situation
183 # for QJSON is substantially different: there are no binaries for QJSON
184 # available, and there is no standard installation directory that is detected
187 # By bundling the QJSON source, we make it much more easier to build the GUI on
188 # Windows and MacOSX. But we only use the bundled sources when ENABLE_GUI is
190 if (QT4_FOUND AND NOT QJSON_FOUND AND (ENABLE_GUI STREQUAL "AUTO"))
191 add_subdirectory (thirdparty/qjson EXCLUDE_FROM_ALL)
192 set (QJSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty)
193 set (QJSON_LIBRARY_DIRS)
194 set (QJSON_LIBRARIES qjson_bundled)
195 set (QJSON_FOUND TRUE)
198 # For glext headers. Needs to be before system includes as often system's GL
199 # headers bundle and include glext.h and glxext.h
200 include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glext)
203 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/khr)
205 ##############################################################################
206 # Installation directories
209 # On Windows/MacOSX, applications are usually installed on a directory of
211 set (DOC_INSTALL_DIR doc)
213 set (DOC_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME})
216 set (LIB_INSTALL_DIR lib/apitrace)
219 # MacOSX uses fat binaries, so no need to have per-architecture wrapper
221 set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR})
223 set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR}/${CMAKE_SYSTEM_PROCESSOR})
226 set(SCRIPTS_INSTALL_DIR ${LIB_INSTALL_DIR}/scripts)
227 set(WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers)
229 # Expose the binary/install directories to source
231 # TODO: Use the same directory layout, for both build and install directories,
232 # so that binaries can find each other using just relative paths.
235 -DAPITRACE_BINARY_DIR="${CMAKE_BINARY_DIR}"
236 -DAPITRACE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
237 -DAPITRACE_WRAPPER_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR}"
241 ##############################################################################
242 # Common libraries / utilities
244 include_directories (
245 ${CMAKE_CURRENT_BINARY_DIR}
246 ${CMAKE_CURRENT_SOURCE_DIR}
247 ${CMAKE_CURRENT_SOURCE_DIR}/common
251 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
252 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glproc.py > ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
253 DEPENDS glproc.py dispatch.py specs/wglapi.py specs/glxapi.py specs/cglapi.py specs/eglapi.py specs/glesapi.py specs/glapi.py specs/gltypes.py specs/stdapi.py
256 # Wrap glproc.hpp as a target to prevent the command from being executed
257 # multiple times simulatenously, when the targets that depend on it are built
259 add_custom_target (glproc DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp)
262 set (os os_win32.cpp)
263 set (glws_os glws_wgl.cpp)
265 set (os os_posix.cpp)
267 set (glws_os glws_cocoa.mm)
269 set (glws_os glws_glx.cpp)
273 add_library (common STATIC
274 common/trace_callset.cpp
275 common/trace_dump.cpp
276 common/trace_file.cpp
277 common/trace_file_read.cpp
278 common/trace_file_write.cpp
279 common/trace_file_zlib.cpp
280 common/trace_file_snappy.cpp
281 common/trace_copier.cpp
282 common/trace_model.cpp
283 common/trace_parser.cpp
284 common/trace_parser_flags.cpp
285 common/trace_writer.cpp
286 common/trace_writer_local.cpp
287 common/trace_writer_model.cpp
288 common/trace_loader.cpp
289 common/trace_resource.cpp
290 common/trace_tools_trace.cpp
298 set_target_properties (common PROPERTIES
299 COMPILE_DEFINITIONS APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
300 # Ensure it can be statically linked in shared libraries
301 COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
304 link_libraries (common)
307 ##############################################################################
312 # Silence warnings about @nn suffix mismatch
313 set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--enable-stdcall-fixup")
317 if (DirectX_D3D_INCLUDE_DIR)
318 include_directories (SYSTEM ${DirectX_D3D_INCLUDE_DIR})
320 OUTPUT ddrawtrace.cpp
321 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ddrawtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/ddrawtrace.cpp
322 DEPENDS ddrawtrace.py trace.py specs/d3d.py specs/d3dtypes.py specs/d3dcaps.py specs/ddraw.py specs/winapi.py specs/stdapi.py
324 add_library (ddraw MODULE specs/ddraw.def ddrawtrace.cpp)
325 set_target_properties (ddraw
327 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
328 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
330 install (TARGETS ddraw LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
331 endif (DirectX_D3D_INCLUDE_DIR)
334 if (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
335 include_directories (SYSTEM ${DirectX_D3D8_INCLUDE_DIR} ${DirectX_D3DX9_INCLUDE_DIR})
338 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8trace.cpp
339 DEPENDS d3d8trace.py trace.py specs/d3d8.py specs/d3d8types.py specs/d3d8caps.py specs/winapi.py specs/stdapi.py
341 add_library (d3d8 MODULE specs/d3d8.def d3d8trace.cpp d3dshader.cpp)
342 set_target_properties (d3d8
344 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
345 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
347 install (TARGETS d3d8 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
348 endif (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
351 if (DirectX_D3DX9_INCLUDE_DIR)
352 include_directories (SYSTEM ${DirectX_D3DX9_INCLUDE_DIR})
355 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9trace.cpp
356 DEPENDS d3d9trace.py trace.py specs/d3d9.py specs/d3d9types.py specs/d3d9caps.py specs/winapi.py specs/stdapi.py
358 add_library (d3d9 MODULE specs/d3d9.def d3d9trace.cpp d3dshader.cpp)
359 set_target_properties (d3d9
361 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
362 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
364 install (TARGETS d3d9 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
365 endif (DirectX_D3DX9_INCLUDE_DIR)
368 if (DirectX_D3D10_INCLUDE_DIR)
369 include_directories (SYSTEM ${DirectX_D3D10_INCLUDE_DIR})
371 OUTPUT d3d10trace.cpp
372 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10trace.cpp
373 DEPENDS d3d10trace.py trace.py specs/d3d10misc.py specs/d3d10.py specs/dxgi.py specs/dxgitype.py specs/dxgiformat.py specs/winapi.py specs/stdapi.py
375 add_library (d3d10 MODULE specs/d3d10.def d3d10trace.cpp)
376 set_target_properties (d3d10
378 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
379 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
381 install (TARGETS d3d10 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
382 endif (DirectX_D3D10_INCLUDE_DIR)
387 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/wgltrace.cpp
388 DEPENDS wgltrace.py gltrace.py trace.py specs/wglapi.py specs/wglenum.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/winapi.py specs/stdapi.py
390 add_library (wgltrace MODULE specs/opengl32.def
395 add_dependencies (wgltrace glproc)
396 set_target_properties (wgltrace PROPERTIES
399 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
400 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
402 install (TARGETS wgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
408 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/cgltrace.cpp
409 DEPENDS cgltrace.py gltrace.py trace.py specs/cglapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
412 add_library (cgltrace SHARED
418 add_dependencies (cgltrace glproc)
420 set_target_properties (cgltrace PROPERTIES
421 # OpenGL framework name
422 PREFIX "" OUTPUT_NAME "OpenGL" SUFFIX ""
423 # Specificy the version and reexport GLU symbols
424 LINK_FLAGS "-compatibility_version 1 -current_version 1.0.0 -Wl,-reexport_library,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib"
425 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
426 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
429 target_link_libraries (cgltrace
434 install (TARGETS cgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
439 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glxtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glxtrace.cpp
440 DEPENDS glxtrace.py gltrace.py trace.py specs/glxapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
443 add_library (glxtrace SHARED
449 add_dependencies (glxtrace glproc)
451 set_target_properties (glxtrace PROPERTIES
452 # avoid the default "lib" prefix
454 # Prevent symbol relocations internal to our wrapper library to be
455 # overwritten by the application.
456 LINK_FLAGS "-Wl,-Bsymbolic -Wl,-Bsymbolic-functions"
457 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
458 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
461 target_link_libraries (glxtrace
467 install (TARGETS glxtrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
475 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/egltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/egltrace.cpp
476 DEPENDS egltrace.py gltrace.py trace.py specs/eglapi.py specs/glesapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
479 add_library (egltrace SHARED
485 add_dependencies (egltrace glproc)
490 PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
493 set_target_properties (egltrace PROPERTIES
494 # avoid the default "lib" prefix
496 LINK_FLAGS "-Wl,-Bsymbolic -Wl,-Bsymbolic-functions"
497 # Prevent symbol relocations internal to our wrapper library to be
498 # overwritten by the application.
499 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
500 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
503 target_link_libraries (egltrace
508 install (TARGETS egltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
511 ##############################################################################
515 OUTPUT glretrace_gl.cpp
516 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
517 DEPENDS glretrace.py retrace.py specs/glapi.py specs/gltypes.py specs/stdapi.py
521 OUTPUT glstate_params.cpp
522 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
523 DEPENDS glstate.py specs/glparams.py specs/gltypes.py specs/stdapi.py
540 if (WIN32 OR APPLE OR X11_FOUND)
541 add_executable (glretrace
547 add_dependencies (glretrace glproc)
552 PROPERTY COMPILE_DEFINITIONS "RETRACE"
555 target_link_libraries (glretrace
562 target_link_libraries (glretrace
564 "-framework ApplicationServices" # CGS*
565 ${OPENGL_gl_LIBRARY} # CGL*
568 target_link_libraries (glretrace ${X11_X11_LIB})
571 target_link_libraries (glretrace
572 # gdb doesn't like when pthreads is loaded through dlopen (which happens
573 # when dlopen'ing libGL), so link pthreads to avoid this issue. See also
574 # http://stackoverflow.com/questions/2702628/gdb-cannot-find-new-threads-generic-error
579 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
580 target_link_libraries (glretrace rt)
585 install (TARGETS glretrace RUNTIME DESTINATION bin)
588 if (EGL_FOUND AND X11_FOUND AND NOT WIN32 AND NOT APPLE)
589 add_executable (eglretrace
595 add_dependencies (eglretrace glproc)
600 PROPERTY COMPILE_DEFINITIONS "RETRACE"
601 PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
604 target_link_libraries (eglretrace
611 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
612 target_link_libraries (eglretrace rt)
615 install (TARGETS eglretrace RUNTIME DESTINATION bin)
618 ##############################################################################
621 add_subdirectory(cli)
623 ##############################################################################
624 # Scripts (to support the CLI)
628 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/tracediff.sh
629 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/jsondiff.py
630 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/snapdiff.py
631 DESTINATION ${SCRIPTS_INSTALL_DIR}
634 ##############################################################################
637 if (ENABLE_GUI AND QT4_FOUND AND QJSON_FOUND)
638 add_subdirectory(gui)
642 ##############################################################################
652 DESTINATION ${DOC_INSTALL_DIR}
655 set (CPACK_PACKAGE_VERSION_MAJOR "2")
656 set (CPACK_PACKAGE_VERSION_MINOR "0")
658 # Use current date in YYYYMMDD format as patch number
660 COMMAND ${PYTHON_EXECUTABLE} -c "import time, sys; sys.stdout.write(time.strftime('%Y%m%d'))"
661 OUTPUT_VARIABLE CPACK_PACKAGE_VERSION_PATCH
664 # See http://www.vtk.org/Wiki/CMake:CPackPackageGenerators
666 set (CPACK_GENERATOR "ZIP")
668 set (CPACK_GENERATOR "DragNDrop")
670 set (CPACK_GENERATOR "TBZ2")