]> git.cworth.org Git - apitrace/commitdiff
MSVC build fixes.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 23 Nov 2010 21:12:23 +0000 (21:12 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 23 Nov 2010 21:12:23 +0000 (21:12 +0000)
CMakeLists.txt
log.cpp
os_posix.cpp

index 6f2ccfd23ef40311502f90f2906dc208ca8b75b7..b7f98f50094785dcf642d8d3a6accf9052f978ea 100644 (file)
@@ -100,28 +100,28 @@ if (WIN32)
        set (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/wrappers)
 
        # d3d8.dll
-       if (DirectX_D3D8_FOUND)
-               include_directories (${DirectX_D3D8_INCLUDE_DIR})
-               add_custom_command (
-                       OUTPUT d3d8.cpp
-                       COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8.cpp
-                       DEPENDS d3d8.py d3d8types.py d3d8caps.py windows.py base.py
-               )
-               add_library (d3d8 SHARED d3d8.def d3d8.cpp log.cpp os_win32.cpp)
-               set_target_properties (d3d8 PROPERTIES PREFIX "")
-       endif (DirectX_D3D8_FOUND)
+    #if (DirectX_D3D8_FOUND)
+       #       include_directories (${DirectX_D3D8_INCLUDE_DIR})
+       #       add_custom_command (
+       #               OUTPUT d3d8.cpp
+       #               COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8.cpp
+       #               DEPENDS d3d8.py d3d8types.py d3d8caps.py windows.py base.py
+       #       )
+       #       add_library (d3d8 SHARED d3d8.def d3d8.cpp log.cpp os_win32.cpp)
+       #       set_target_properties (d3d8 PROPERTIES PREFIX "")
+       #endif (DirectX_D3D8_FOUND)
 
        # d3d9.dll
-       if (DirectX_D3DX9_FOUND)
-               include_directories (${DirectX_D3DX9_INCLUDE_DIR})
-               add_custom_command (
-                       OUTPUT d3d9.cpp
-                       COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9.cpp
-                       DEPENDS d3d9.py d3d9types.py d3d9caps.py d3dshader.py windows.py base.py
-               )
-               add_library (d3d9 SHARED d3d9.def d3d9.cpp log.cpp os_win32.cpp)
-               set_target_properties (d3d9 PROPERTIES PREFIX "")
-       endif (DirectX_D3DX9_FOUND)
+    #if (DirectX_D3DX9_FOUND)
+       #       include_directories (${DirectX_D3DX9_INCLUDE_DIR})
+       #       add_custom_command (
+       #               OUTPUT d3d9.cpp
+       #               COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9.cpp
+       #               DEPENDS d3d9.py d3d9types.py d3d9caps.py d3dshader.py windows.py base.py
+       #       )
+       #       add_library (d3d9 SHARED d3d9.def d3d9.cpp log.cpp os_win32.cpp)
+       #       set_target_properties (d3d9 PROPERTIES PREFIX "")
+       #endif (DirectX_D3DX9_FOUND)
 
        # d3d10.dll
        #if (DirectX_D3D10_FOUND)
diff --git a/log.cpp b/log.cpp
index e634b653136300b50ad8bd776ddb6fa12a3d1339..7a5911add321da9b3498fcf9a80e0f75a9fcc5b8 100644 (file)
--- a/log.cpp
+++ b/log.cpp
@@ -199,6 +199,7 @@ void EndElement(void) { }
 
 void BeginStruct(const char *name) {
    WriteByte(Trace::TYPE_STRUCT);
+   (void)name;
 }
 
 void EndStruct(void) {
@@ -310,9 +311,4 @@ void Abort(void) {
     OS::Abort();
 }
 
-static void _uninit(void) __attribute__((destructor));
-static void _uninit(void) {
-   Close();
-}
-
 } /* namespace Log */
index 08d9acde9815689e3488186c12af506d53340093..3f423fe99cd1e01d3f8b7312e6590fbe37981f52 100644 (file)
@@ -30,6 +30,7 @@
 #include <pthread.h>
 
 #include "os.hpp"
+#include "log.hpp"
 
 namespace OS {
 
@@ -101,3 +102,9 @@ Abort(void)
 
 
 } /* namespace OS */
+
+static void _uninit(void) __attribute__((destructor));
+static void _uninit(void) {
+    Log::Close();
+}
+