# Common libraries / utilities
include_directories (
+ ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/common
)
DEPENDS wgltrace.py gltrace.py trace.py specs/wglapi.py specs/wglenum.py specs/glapi.py specs/glparams.py specs/gltypes.py specs/winapi.py specs/stdapi.py
)
add_library (wgltrace MODULE specs/opengl32.def
+ ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
wgltrace.cpp
glcaps.cpp
glproc_gl.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
)
set_target_properties (wgltrace PROPERTIES
PREFIX ""
)
add_library (cgltrace SHARED
+ ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
cgltrace.cpp
glcaps.cpp
glproc_gl.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
)
set_target_properties (cgltrace PROPERTIES
DEPENDS glstate.py specs/glparams.py specs/gltypes.py specs/stdapi.py
)
-include_directories (
- ${CMAKE_CURRENT_BINARY_DIR}
- ${OPENGL_INCLUDE_PATH}
-)
-
set (retrace_sources
+ ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
glretrace_gl.cpp
glretrace_cgl.cpp
glretrace_glx.cpp
retrace.cpp
retrace_stdc.cpp
glws.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
)
add_executable (glretrace
)
if (WIN32)
-elseif (APPLE)
- target_link_libraries (glretrace
- "-framework Cocoa"
- "-framework ApplicationServices" # CGS*
- ${OPENGL_gl_LIBRARY} # CGL*
- )
else ()
- target_link_libraries (glretrace ${X11_X11_LIB})
+ if (APPLE)
+ target_link_libraries (glretrace
+ "-framework Cocoa"
+ "-framework ApplicationServices" # CGS*
+ ${OPENGL_gl_LIBRARY} # CGL*
+ )
+ else ()
+ target_link_libraries (glretrace ${X11_X11_LIB})
+ endif ()
+
+ # gdb doesn't like when pthreads is loaded through dlopen (which happens
+ # when dlopen'ing libGL), so link pthreads to avoid this issue. See also
+ # http://stackoverflow.com/questions/2702628/gdb-cannot-find-new-threads-generic-error
+ target_link_libraries (glretrace pthread)
endif ()
install (TARGETS glretrace RUNTIME DESTINATION bin)
target_link_libraries (eglretrace
common
- )
-
- target_link_libraries (eglretrace
${X11_X11_LIB}
+ pthread
)
install (TARGETS eglretrace RUNTIME DESTINATION bin)