##############################################################################
# Find dependencies
-# Ensure __thread is support
-if (NOT MSVC)
+# Check for compiler TLS support. We don't use compiler TLS support on Windows
+# because, even if the compiler supports it, Windows XP does not support TLS on
+# DLLs.
+if (NOT WIN32)
include (CheckCXXSourceCompiles)
check_cxx_source_compiles("__thread int i; int main() { return 0; }" HAVE_COMPILER_TLS)
- if (NOT HAVE_COMPILER_TLS)
- if (APPLE)
- message (FATAL_ERROR "C++ compiler does not support __thread keyword. Please install XCode 4.5 or higher.")
- else (MINGW32)
- message (FATAL_ERROR "C++ compiler does not support __thread keyword. Please use MinGW g++ version 4.4 or higher")
- else ()
- message (FATAL_ERROR "C++ compiler does not support __thread keyword.")
- endif ()
+ if (HAVE_COMPILER_TLS)
+ add_definitions (-DHAVE_COMPILER_TLS=__thread)
+ else ()
+ message (WARNING "C++ compiler does not support __thread keyword.")
endif ()
endif ()
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
+ CHECK_INCLUDE_FILES(proc/readproc.h READPROC_H_FOUND)
+ if (READPROC_H_FOUND)
+ add_definitions (-DHAVE_READPROC_H)
+ find_library (proc_LIBRARY NAMES proc procps)
+ endif ()
endif()
if (WIN32 OR APPLE)
if (WIN32)
add_subdirectory (thirdparty/less)
+ add_subdirectory (thirdparty/directxtex)
endif ()
# Always use bundled QJSon.
)
set_target_properties (common PROPERTIES
- COMPILE_DEFINITIONS APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
# Ensure it can be statically linked in shared libraries
COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
)
install (
PROGRAMS
- ${CMAKE_CURRENT_SOURCE_DIR}/scripts/tracediff.py
- ${CMAKE_CURRENT_SOURCE_DIR}/scripts/jsondiff.py
- ${CMAKE_CURRENT_SOURCE_DIR}/scripts/snapdiff.py
+ scripts/highlight.py
+ scripts/jsondiff.py
+ scripts/profileshader.py
+ scripts/retracediff.py
+ scripts/snapdiff.py
+ scripts/tracecheck.py
+ scripts/tracediff.py
+ scripts/unpickle.py
DESTINATION ${SCRIPTS_INSTALL_DIR}
)
+if (WIN32)
+ install (
+ PROGRAMS scripts/convert.py
+ DESTINATION ${SCRIPTS_INSTALL_DIR}
+ )
+endif ()
##############################################################################
# GUI