]> git.cworth.org Git - apitrace/blobdiff - CMakeLists.txt
Use double buffer visuals by default.
[apitrace] / CMakeLists.txt
index afa082cceba2c621993842d02a5950444acac52f..7fd53c792ddf8c01d1638818b4a776391c8ff477 100755 (executable)
@@ -100,7 +100,20 @@ if (ZLIB_FOUND)
     include_directories (${ZLIB_INCLUDE_DIRS})
     link_libraries (${ZLIB_LIBRARIES})
 else (ZLIB_FOUND)
-    add_subdirectory (zlib)
+    add_library (zlib STATIC
+        zlib/adler32.c
+        zlib/compress.c
+        zlib/crc32.c
+        zlib/gzio.c
+        zlib/uncompr.c
+        zlib/deflate.c
+        zlib/trees.c
+        zlib/zutil.c
+        zlib/inflate.c
+        zlib/infback.c
+        zlib/inftrees.c
+        zlib/inffast.c
+    )
     include_directories (zlib)
     link_libraries (zlib)
 endif (ZLIB_FOUND)
@@ -150,7 +163,7 @@ else (WIN32)
     set (glws glws_glx.cpp)
 endif (WIN32)
 
-add_library (trace trace_model.cpp trace_parser.cpp trace_writer.cpp ${os})
+add_library (trace trace_model.cpp trace_parser.cpp trace_writer.cpp trace_model_writer.cpp ${os})
 
 add_executable (tracedump tracedump.cpp)
 target_link_libraries (tracedump trace)
@@ -246,32 +259,26 @@ if (WIN32)
 elseif (APPLE)
     include_directories (${X11_INCLUDE_DIR})
 
-    # libGL.dylib
+    # OpenGL framework
     add_custom_command (
         OUTPUT cgltrace.cpp
         COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/cgltrace.cpp
-        DEPENDS cgltrace.py gltrace.py trace.py glxapi.py glapi.py glparams.py gltypes.py stdapi.py
+        DEPENDS cgltrace.py gltrace.py trace.py cglapi.py glapi.py glparams.py gltypes.py stdapi.py
     )
 
     add_library (cgltrace SHARED cgltrace.cpp trace_writer.cpp os_posix.cpp ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp)
 
     set_target_properties (cgltrace PROPERTIES
-        # libGL.dylib
-        OUTPUT_NAME GL
-        # match the version
-        LINK_FLAGS "-compatibility_version 1 -current_version 1.0.0"
+        # For
+        PREFIX "" OUTPUT_NAME "OpenGL" SUFFIX ""
+        # Specificy the version and reexport GLU symbols
+        LINK_FLAGS "-compatibility_version 1 -current_version 1.0.0 -Wl,-reexport_library,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib"
         RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
         LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/wrappers
     )
 
     target_link_libraries (cgltrace dl)
 
-    # Symbolic link from system's libGL.dylib
-    add_custom_command (
-        TARGET cgltrace
-        COMMAND ln -sf /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib ${PROJECT_BINARY_DIR}/wrappers/libGL.system.dylib
-    )
-
     install (TARGETS cgltrace LIBRARY DESTINATION lib)
 else ()
     include_directories (${X11_INCLUDE_DIR})