add_definitions (-Wno-sign-compare) # comparison between signed and unsigned integer expressions
endif ()
+if (MINGW)
+ # Avoid depending on MinGW runtime DLLs
+ check_cxx_compiler_flag (-static-libgcc HAVE_STATIC_LIBGCC_FLAG)
+ if (HAVE_STATIC_LIBGCC_FLAG)
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc")
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc")
+ set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libgcc")
+ endif ()
+ check_cxx_compiler_flag (-static-libstdc++ HAVE_STATIC_LIBSTDCXX_FLAG)
+ if (HAVE_STATIC_LIBSTDCXX_FLAG)
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++")
+ set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libstdc++")
+ endif ()
+endif ()
+
# Put all executables into the same top level build directory, regardless of
# which subdirectory they are declared
add_library (common STATIC
common/trace_file.cpp
- common/trace_snappyfile.cpp
+ common/trace_file_zlib.cpp
+ common/trace_file_snappy.cpp
common/trace_model.cpp
common/trace_parser.cpp
common/trace_writer.cpp
- common/trace_local_writer.cpp
- common/trace_model_writer.cpp
+ common/trace_writer_local.cpp
+ common/trace_writer_model.cpp
common/trace_loader.cpp
common/image.cpp
common/image_bmp.cpp
link_libraries (common)
-add_executable (tracedump tracedump.cpp)
-install (TARGETS tracedump RUNTIME DESTINATION bin)
-
-
##############################################################################
# API tracers
glstate.cpp
glstate_params.cpp
retrace.cpp
+ retrace_stdc.cpp
glws.cpp
${glws_os}
${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
install (TARGETS glretrace RUNTIME DESTINATION bin)
+##############################################################################
+# CLI
+
+add_subdirectory(cli)
##############################################################################
# GUI