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_dump.cpp
275 common/trace_file.cpp
276 common/trace_file_read.cpp
277 common/trace_file_write.cpp
278 common/trace_file_zlib.cpp
279 common/trace_file_snappy.cpp
280 common/trace_model.cpp
281 common/trace_parser.cpp
282 common/trace_parser_flags.cpp
283 common/trace_writer.cpp
284 common/trace_writer_local.cpp
285 common/trace_writer_model.cpp
286 common/trace_loader.cpp
287 common/trace_resource.cpp
288 common/trace_tools_trace.cpp
296 set_target_properties (common PROPERTIES
297 COMPILE_DEFINITIONS APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
298 # Ensure it can be statically linked in shared libraries
299 COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
302 link_libraries (common)
305 ##############################################################################
310 # Silence warnings about @nn suffix mismatch
311 set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--enable-stdcall-fixup")
315 if (DirectX_D3D_INCLUDE_DIR)
316 include_directories (SYSTEM ${DirectX_D3D_INCLUDE_DIR})
318 OUTPUT ddrawtrace.cpp
319 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ddrawtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/ddrawtrace.cpp
320 DEPENDS ddrawtrace.py trace.py specs/d3d.py specs/d3dtypes.py specs/d3dcaps.py specs/ddraw.py specs/winapi.py specs/stdapi.py
322 add_library (ddraw MODULE specs/ddraw.def ddrawtrace.cpp)
323 set_target_properties (ddraw
325 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
326 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
328 install (TARGETS ddraw LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
329 endif (DirectX_D3D_INCLUDE_DIR)
332 if (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
333 include_directories (SYSTEM ${DirectX_D3D8_INCLUDE_DIR} ${DirectX_D3DX9_INCLUDE_DIR})
336 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8trace.cpp
337 DEPENDS d3d8trace.py trace.py specs/d3d8.py specs/d3d8types.py specs/d3d8caps.py specs/winapi.py specs/stdapi.py
339 add_library (d3d8 MODULE specs/d3d8.def d3d8trace.cpp d3dshader.cpp)
340 set_target_properties (d3d8
342 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
343 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
345 install (TARGETS d3d8 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
346 endif (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
349 if (DirectX_D3DX9_INCLUDE_DIR)
350 include_directories (SYSTEM ${DirectX_D3DX9_INCLUDE_DIR})
353 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9trace.cpp
354 DEPENDS d3d9trace.py trace.py specs/d3d9.py specs/d3d9types.py specs/d3d9caps.py specs/winapi.py specs/stdapi.py
356 add_library (d3d9 MODULE specs/d3d9.def d3d9trace.cpp d3dshader.cpp)
357 set_target_properties (d3d9
359 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
360 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
362 install (TARGETS d3d9 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
363 endif (DirectX_D3DX9_INCLUDE_DIR)
366 if (DirectX_D3D10_INCLUDE_DIR)
367 include_directories (SYSTEM ${DirectX_D3D10_INCLUDE_DIR})
369 OUTPUT d3d10trace.cpp
370 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10trace.cpp
371 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
373 add_library (d3d10 MODULE specs/d3d10.def d3d10trace.cpp)
374 set_target_properties (d3d10
376 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
377 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
379 install (TARGETS d3d10 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
380 endif (DirectX_D3D10_INCLUDE_DIR)
385 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/wgltrace.cpp
386 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
388 add_library (wgltrace MODULE specs/opengl32.def
393 add_dependencies (wgltrace glproc)
394 set_target_properties (wgltrace PROPERTIES
397 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
398 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
400 install (TARGETS wgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
406 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/cgltrace.cpp
407 DEPENDS cgltrace.py gltrace.py trace.py specs/cglapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
410 add_library (cgltrace SHARED
416 add_dependencies (cgltrace glproc)
418 set_target_properties (cgltrace PROPERTIES
419 # OpenGL framework name
420 PREFIX "" OUTPUT_NAME "OpenGL" SUFFIX ""
421 # Specificy the version and reexport GLU symbols
422 LINK_FLAGS "-compatibility_version 1 -current_version 1.0.0 -Wl,-reexport_library,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib"
423 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
424 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
427 target_link_libraries (cgltrace
432 install (TARGETS cgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
437 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glxtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glxtrace.cpp
438 DEPENDS glxtrace.py gltrace.py trace.py specs/glxapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
441 add_library (glxtrace SHARED
447 add_dependencies (glxtrace glproc)
449 set_target_properties (glxtrace PROPERTIES
450 # avoid the default "lib" prefix
452 # Prevent symbol relocations internal to our wrapper library to be
453 # overwritten by the application.
454 LINK_FLAGS "-Wl,-Bsymbolic -Wl,-Bsymbolic-functions"
455 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
456 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
459 target_link_libraries (glxtrace
465 install (TARGETS glxtrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
473 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/egltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/egltrace.cpp
474 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
477 add_library (egltrace SHARED
483 add_dependencies (egltrace glproc)
488 PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
491 set_target_properties (egltrace PROPERTIES
492 # avoid the default "lib" prefix
494 LINK_FLAGS "-Wl,-Bsymbolic -Wl,-Bsymbolic-functions"
495 # Prevent symbol relocations internal to our wrapper library to be
496 # overwritten by the application.
497 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
498 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
501 target_link_libraries (egltrace
506 install (TARGETS egltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
509 ##############################################################################
513 OUTPUT glretrace_gl.cpp
514 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
515 DEPENDS glretrace.py retrace.py specs/glapi.py specs/gltypes.py specs/stdapi.py
519 OUTPUT glstate_params.cpp
520 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
521 DEPENDS glstate.py specs/glparams.py specs/gltypes.py specs/stdapi.py
538 if (WIN32 OR APPLE OR X11_FOUND)
539 add_executable (glretrace
545 add_dependencies (glretrace glproc)
550 PROPERTY COMPILE_DEFINITIONS "RETRACE"
553 target_link_libraries (glretrace
560 target_link_libraries (glretrace
562 "-framework ApplicationServices" # CGS*
563 ${OPENGL_gl_LIBRARY} # CGL*
566 target_link_libraries (glretrace ${X11_X11_LIB})
569 target_link_libraries (glretrace
570 # gdb doesn't like when pthreads is loaded through dlopen (which happens
571 # when dlopen'ing libGL), so link pthreads to avoid this issue. See also
572 # http://stackoverflow.com/questions/2702628/gdb-cannot-find-new-threads-generic-error
577 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
578 target_link_libraries (glretrace rt)
583 install (TARGETS glretrace RUNTIME DESTINATION bin)
586 if (EGL_FOUND AND X11_FOUND AND NOT WIN32 AND NOT APPLE)
587 add_executable (eglretrace
593 add_dependencies (eglretrace glproc)
598 PROPERTY COMPILE_DEFINITIONS "RETRACE"
599 PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
602 target_link_libraries (eglretrace
609 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
610 target_link_libraries (eglretrace rt)
613 install (TARGETS eglretrace RUNTIME DESTINATION bin)
616 ##############################################################################
619 add_subdirectory(cli)
621 ##############################################################################
622 # Scripts (to support the CLI)
626 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/tracediff.sh
627 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/jsondiff.py
628 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/snapdiff.py
629 DESTINATION ${SCRIPTS_INSTALL_DIR}
632 ##############################################################################
635 if (ENABLE_GUI AND QT4_FOUND AND QJSON_FOUND)
636 add_subdirectory(gui)
640 ##############################################################################
650 DESTINATION ${DOC_INSTALL_DIR}
653 set (CPACK_PACKAGE_VERSION_MAJOR "2")
654 set (CPACK_PACKAGE_VERSION_MINOR "0")
656 # Use current date in YYYYMMDD format as patch number
658 COMMAND ${PYTHON_EXECUTABLE} -c "import time, sys; sys.stdout.write(time.strftime('%Y%m%d'))"
659 OUTPUT_VARIABLE CPACK_PACKAGE_VERSION_PATCH
662 # See http://www.vtk.org/Wiki/CMake:CPackPackageGenerators
664 set (CPACK_GENERATOR "ZIP")
666 set (CPACK_GENERATOR "DragNDrop")
668 set (CPACK_GENERATOR "TBZ2")