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)
49 find_package (X11 REQUIRED)
51 include_directories (${X11_INCLUDE_DIR})
54 if (NOT ENABLE_EGL STREQUAL "AUTO")
55 set (REQUIRE_EGL REQUIRED)
57 pkg_check_modules (EGL egl glesv1_cm glesv2 ${REQUIRE_EGL})
59 include_directories (${EGL_INCLUDE_DIR})
60 add_definitions (-DHAVE_EGL)
68 ##############################################################################
69 # Set global build options
71 include (CheckCXXCompilerFlag)
74 # MSVC & MinGW only define & use APIENTRY
75 add_definitions (-DGLAPIENTRY=__stdcall)
77 # http://msdn.microsoft.com/en-us/library/aa383745.aspx
78 add_definitions (-D_WIN32_WINNT=0x0500 -DWINVER=0x0500)
80 CHECK_CXX_COMPILER_FLAG("-fvisibility=hidden" CXX_COMPILER_FLAG_VISIBILITY)
81 if (CXX_COMPILER_FLAG_VISIBILITY)
82 add_definitions ("-fvisibility=hidden")
83 endif (CXX_COMPILER_FLAG_VISIBILITY)
87 # C99 includes for msvc
88 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/msvc)
90 # Enable math constants defines
91 add_definitions (-D_USE_MATH_DEFINES)
94 add_definitions (-DNOMINMAX)
97 add_definitions (-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS)
98 add_definitions (-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
100 add_definitions (-wd4063) # not a valid value for switch of enum
101 add_definitions (-wd4127) # conditional expression is constant
102 add_definitions (-wd4244) # conversion from 'type1' to 'type2', possible loss of data
103 add_definitions (-wd4505) # unreferenced local function has been removed
104 add_definitions (-wd4800) # forcing value to bool 'true' or 'false' (performance warning)
105 # XXX: it's safer to use ssize_t everywhere instead of disabling warning
106 add_definitions (-wd4018) # signed/unsigned mismatch
109 # http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
111 CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
112 CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
114 if (${flag_var} MATCHES "/MD")
115 string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
116 endif (${flag_var} MATCHES "/MD")
117 endforeach (flag_var)
120 add_definitions (-Wall)
121 # XXX: it's safer to use ssize_t everywhere instead of disabling warning
122 add_definitions (-Wno-sign-compare) # comparison between signed and unsigned integer expressions
126 # Avoid depending on MinGW runtime DLLs
127 check_cxx_compiler_flag (-static-libgcc HAVE_STATIC_LIBGCC_FLAG)
128 if (HAVE_STATIC_LIBGCC_FLAG)
129 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc")
130 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc")
131 set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libgcc")
133 check_cxx_compiler_flag (-static-libstdc++ HAVE_STATIC_LIBSTDCXX_FLAG)
134 if (HAVE_STATIC_LIBSTDCXX_FLAG)
135 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
136 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++")
137 set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libstdc++")
142 # Put all executables into the same top level build directory, regardless of
143 # which subdirectory they are declared
144 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
147 ##############################################################################
148 # Bundled dependencies
150 # We always use the bundled zlib, libpng, and snappy sources:
151 # - on Windows to make it easy to deploy the wrappers DLLs
152 # - on unices to prevent symbol collisions when tracing applications that link
153 # against other versions of these libraries
155 set (ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib)
156 set (ZLIB_LIBRARIES z_bundled)
157 add_subdirectory (thirdparty/zlib EXCLUDE_FROM_ALL)
159 include_directories (${ZLIB_INCLUDE_DIRS})
160 link_libraries (${ZLIB_LIBRARIES})
162 set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy)
163 set (SNAPPY_LIBRARIES snappy_bundled)
164 add_subdirectory (thirdparty/snappy EXCLUDE_FROM_ALL)
166 include_directories (${SNAPPY_INCLUDE_DIRS})
167 link_libraries (${SNAPPY_LIBRARIES})
169 set (PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng)
170 set (PNG_DEFINITIONS "")
171 set (PNG_LIBRARIES png_bundled)
173 add_subdirectory (thirdparty/libpng EXCLUDE_FROM_ALL)
174 include_directories (${PNG_INCLUDE_DIR})
175 add_definitions (${PNG_DEFINITIONS})
176 link_libraries (${PNG_LIBRARIES})
178 # The Qt website provides binaries for Windows and MacOSX, and they are
179 # automatically found by cmake without any manual intervention. The situation
180 # for QJSON is substantially different: there are no binaries for QJSON
181 # available, and there is no standard installation directory that is detected
184 # By bundling the QJSON source, we make it much more easier to build the GUI on
185 # Windows and MacOSX. But we only use the bundled sources when ENABLE_GUI is
187 if (QT4_FOUND AND NOT QJSON_FOUND AND (ENABLE_GUI STREQUAL "AUTO"))
188 add_subdirectory (thirdparty/qjson EXCLUDE_FROM_ALL)
189 set (QJSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/qjson)
190 set (QJSON_LIBRARY_DIRS)
191 set (QJSON_LIBRARIES qjson_bundled)
192 set (QJSON_FOUND TRUE)
196 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty)
199 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/khr)
201 ##############################################################################
202 # Installation directories
205 # On Windows/MacOSX, applications are usually installed on a directory of
207 set (DOC_INSTALL_DIR doc)
209 set (DOC_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME})
212 set (LIB_INSTALL_DIR lib/apitrace)
215 # MacOSX uses fat binaries, so no need to have per-architecture wrapper
217 set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR})
219 set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR}/${CMAKE_SYSTEM_PROCESSOR})
222 set(SCRIPTS_INSTALL_DIR ${LIB_INSTALL_DIR}/scripts)
223 set(WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers)
225 # Expose the binary/install directories to source
227 # TODO: Use the same directory layout, for both build and install directories,
228 # so that binaries can find each other using just relative paths.
231 -DAPITRACE_BINARY_DIR="${CMAKE_BINARY_DIR}"
232 -DAPITRACE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
233 -DAPITRACE_WRAPPER_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR}"
237 ##############################################################################
238 # Common libraries / utilities
240 include_directories (
241 ${CMAKE_CURRENT_SOURCE_DIR}
242 ${CMAKE_CURRENT_SOURCE_DIR}/common
246 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
247 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glproc.py > ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
248 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
252 set (os os_win32.cpp)
253 set (glws_os glws_wgl.cpp)
255 set (os os_posix.cpp)
257 set (glws_os glws_cocoa.mm)
259 set (glws_os glws_glx.cpp)
263 add_library (common STATIC
264 common/trace_file.cpp
265 common/trace_file_read.cpp
266 common/trace_file_write.cpp
267 common/trace_file_zlib.cpp
268 common/trace_file_snappy.cpp
269 common/trace_model.cpp
270 common/trace_parser.cpp
271 common/trace_parser_flags.cpp
272 common/trace_writer.cpp
273 common/trace_writer_local.cpp
274 common/trace_writer_model.cpp
275 common/trace_loader.cpp
276 common/trace_resource.cpp
277 common/trace_tools_trace.cpp
285 set_target_properties (common PROPERTIES
286 COMPILE_DEFINITIONS APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
287 # Ensure it can be statically linked in shared libraries
288 COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
291 link_libraries (common)
294 ##############################################################################
299 # Silence warnings about @nn suffix mismatch
300 set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--enable-stdcall-fixup")
304 if (DirectX_D3D_INCLUDE_DIR)
305 include_directories (SYSTEM ${DirectX_D3D_INCLUDE_DIR})
307 OUTPUT ddrawtrace.cpp
308 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ddrawtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/ddrawtrace.cpp
309 DEPENDS ddrawtrace.py trace.py specs/d3d.py specs/d3dtypes.py specs/d3dcaps.py specs/ddraw.py specs/winapi.py specs/stdapi.py
311 add_library (ddraw MODULE specs/ddraw.def ddrawtrace.cpp)
312 set_target_properties (ddraw
314 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
315 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
317 install (TARGETS ddraw LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
318 endif (DirectX_D3D_INCLUDE_DIR)
321 if (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
322 include_directories (SYSTEM ${DirectX_D3D8_INCLUDE_DIR} ${DirectX_D3DX9_INCLUDE_DIR})
325 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8trace.cpp
326 DEPENDS d3d8trace.py trace.py specs/d3d8.py specs/d3d8types.py specs/d3d8caps.py specs/winapi.py specs/stdapi.py
328 add_library (d3d8 MODULE specs/d3d8.def d3d8trace.cpp d3dshader.cpp)
329 set_target_properties (d3d8
331 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
332 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
334 install (TARGETS d3d8 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
335 endif (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3DX9_INCLUDE_DIR)
338 if (DirectX_D3DX9_INCLUDE_DIR)
339 include_directories (SYSTEM ${DirectX_D3DX9_INCLUDE_DIR})
342 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9trace.cpp
343 DEPENDS d3d9trace.py trace.py specs/d3d9.py specs/d3d9types.py specs/d3d9caps.py specs/winapi.py specs/stdapi.py
345 add_library (d3d9 MODULE specs/d3d9.def d3d9trace.cpp d3dshader.cpp)
346 set_target_properties (d3d9
348 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
349 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
351 install (TARGETS d3d9 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
352 endif (DirectX_D3DX9_INCLUDE_DIR)
355 if (DirectX_D3D10_INCLUDE_DIR)
356 include_directories (SYSTEM ${DirectX_D3D10_INCLUDE_DIR})
358 OUTPUT d3d10trace.cpp
359 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d10trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d10trace.cpp
360 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
362 add_library (d3d10 MODULE specs/d3d10.def d3d10trace.cpp)
363 set_target_properties (d3d10
365 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
366 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
368 install (TARGETS d3d10 LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
369 endif (DirectX_D3D10_INCLUDE_DIR)
374 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/wgltrace.cpp
375 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
377 add_library (wgltrace MODULE specs/opengl32.def
381 ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
383 set_target_properties (wgltrace PROPERTIES
386 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
387 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
389 install (TARGETS wgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
395 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/cgltrace.cpp
396 DEPENDS cgltrace.py gltrace.py trace.py specs/cglapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
399 add_library (cgltrace SHARED
403 ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
406 set_target_properties (cgltrace PROPERTIES
407 # OpenGL framework name
408 PREFIX "" OUTPUT_NAME "OpenGL" SUFFIX ""
409 # Specificy the version and reexport GLU symbols
410 LINK_FLAGS "-compatibility_version 1 -current_version 1.0.0 -Wl,-reexport_library,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib"
411 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
412 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
415 target_link_libraries (cgltrace dl)
417 install (TARGETS cgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
422 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glxtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glxtrace.cpp
423 DEPENDS glxtrace.py gltrace.py trace.py specs/glxapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
426 add_library (glxtrace SHARED
427 ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
433 set_target_properties (glxtrace PROPERTIES
434 # avoid the default "lib" prefix
436 # Prevent symbol relocations internal to our wrapper library to be
437 # overwritten by the application.
438 LINK_FLAGS "-Wl,-Bsymbolic -Wl,-Bsymbolic-functions"
439 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
440 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
443 target_link_libraries (glxtrace dl ${X11_X11_LIB})
445 install (TARGETS glxtrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
453 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/egltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/egltrace.cpp
454 DEPENDS egltrace.py gltrace.py trace.py specs/eglapi.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/stdapi.py
457 add_library (egltrace SHARED
458 ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
467 PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
470 set_target_properties (egltrace PROPERTIES
471 # avoid the default "lib" prefix
473 LINK_FLAGS "-Wl,-Bsymbolic -Wl,-Bsymbolic-functions"
474 # Prevent symbol relocations internal to our wrapper library to be
475 # overwritten by the application.
476 RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
477 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
480 target_link_libraries (egltrace dl)
482 install (TARGETS egltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
485 ##############################################################################
489 OUTPUT glretrace_gl.cpp
490 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
491 DEPENDS glretrace.py retrace.py specs/glapi.py specs/gltypes.py specs/stdapi.py
495 OUTPUT glstate_params.cpp
496 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
497 DEPENDS glstate.py specs/glparams.py specs/gltypes.py specs/stdapi.py
500 include_directories (
501 ${CMAKE_CURRENT_BINARY_DIR}
502 ${OPENGL_INCLUDE_PATH}
517 ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
520 add_executable (glretrace
529 PROPERTY COMPILE_DEFINITIONS "RETRACE"
532 target_link_libraries (glretrace
539 target_link_libraries (glretrace
541 "-framework ApplicationServices" # CGS*
542 ${OPENGL_gl_LIBRARY} # CGL*
545 target_link_libraries (glretrace ${X11_X11_LIB})
548 # gdb doesn't like when pthreads is loaded through dlopen (which happens
549 # when dlopen'ing libGL), so link pthreads to avoid this issue. See also
550 # http://stackoverflow.com/questions/2702628/gdb-cannot-find-new-threads-generic-error
551 target_link_libraries (glretrace pthread)
554 install (TARGETS glretrace RUNTIME DESTINATION bin)
556 if (EGL_FOUND AND NOT WIN32 AND NOT APPLE)
557 add_executable (eglretrace
566 PROPERTY COMPILE_DEFINITIONS "RETRACE"
567 PROPERTY COMPILE_DEFINITIONS "TRACE_EGL"
570 target_link_libraries (eglretrace
576 install (TARGETS eglretrace RUNTIME DESTINATION bin)
579 ##############################################################################
582 add_subdirectory(cli)
584 ##############################################################################
585 # Scripts (to support the CLI)
589 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/tracediff.sh
590 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/jsondiff.py
591 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/snapdiff.py
592 DESTINATION ${SCRIPTS_INSTALL_DIR}
595 ##############################################################################
598 if (ENABLE_GUI AND QT4_FOUND AND QJSON_FOUND)
599 add_subdirectory(gui)
603 ##############################################################################
613 DESTINATION ${DOC_INSTALL_DIR}
616 set (CPACK_PACKAGE_VERSION_MAJOR "2")
617 set (CPACK_PACKAGE_VERSION_MINOR "0")
619 # Use current date in YYYYMMDD format as patch number
621 COMMAND ${PYTHON_EXECUTABLE} -c "import time, sys; sys.stdout.write(time.strftime('%Y%m%d'))"
622 OUTPUT_VARIABLE CPACK_PACKAGE_VERSION_PATCH
625 # See http://www.vtk.org/Wiki/CMake:CPackPackageGenerators
627 set (CPACK_GENERATOR "ZIP")
629 set (CPACK_GENERATOR "DragNDrop")
631 set (CPACK_GENERATOR "TBZ2")