]> git.cworth.org Git - apitrace/blobdiff - CMakeLists.txt
Create contexts with DEBUG_BIT when not benchmarking.
[apitrace] / CMakeLists.txt
index 121a32287c0931eeb620d141b3f818660fcb5dc9..c81e44d8f0131e15766a27bd2821fee5d648a437 100755 (executable)
@@ -197,13 +197,13 @@ add_custom_command (
 
 if (WIN32)
     set (os os_win32.cpp)
-    set (glws glws_wgl.cpp)
+    set (glws_os glws_wgl.cpp)
 else (WIN32)
     set (os os_posix.cpp)
-    set (glws glws_glx.cpp)
+    set (glws_os glws_glx.cpp)
 endif (WIN32)
 
-add_library (common
+add_library (common STATIC
     common/trace_file.cpp
     common/trace_snappyfile.cpp
     common/trace_model.cpp
@@ -221,7 +221,7 @@ add_library (common
 
 set_target_properties (common PROPERTIES
     # Ensure it can be statically linked in shared libraries
-    COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
+    COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
 )
 
 link_libraries (common)
@@ -390,7 +390,7 @@ endif ()
 add_custom_command (
     OUTPUT glretrace_gl.cpp
     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
-    DEPENDS glretrace.py retrace.py codegen.py specs/glapi.py specs/gltypes.py specs/stdapi.py
+    DEPENDS glretrace.py retrace.py specs/glapi.py specs/gltypes.py specs/stdapi.py
 )
 
 add_custom_command (
@@ -413,7 +413,8 @@ add_executable (glretrace
     glstate.cpp
     glstate_params.cpp
     retrace.cpp
-    ${glws}
+    glws.cpp
+    ${glws_os}
     ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
 )