summaryrefslogtreecommitdiff
path: root/wrappers/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/CMakeLists.txt')
-rw-r--r--wrappers/CMakeLists.txt37
1 files changed, 17 insertions, 20 deletions
diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt
index 84ec9a41..622897e4 100644
--- a/wrappers/CMakeLists.txt
+++ b/wrappers/CMakeLists.txt
@@ -74,6 +74,7 @@ endif ()
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+# Code shared across all APIs
add_convenience_library (trace
assert.cpp
memtrace.hpp
@@ -86,6 +87,18 @@ target_link_libraries (trace
${SNAPPY_LIBRARIES}
)
+# Code shared across all OpenGL variants
+add_convenience_library (gltrace_common
+ glcaps.cpp
+ config.cpp
+ gltrace_state.cpp
+)
+add_dependencies (gltrace_common glproc)
+target_link_libraries (gltrace_common
+ glhelpers
+ trace
+)
+
if (WIN32)
if (MINGW)
# Silence warnings about @nn suffix mismatch
@@ -279,15 +292,11 @@ if (WIN32)
)
add_library (wgltrace MODULE opengl32.def
wgltrace.cpp
- glcaps.cpp
- config.cpp
- gltrace_state.cpp
)
add_dependencies (wgltrace glproc)
target_link_libraries (wgltrace
- glhelpers
+ gltrace_common
glproc_gl
- trace
)
set_target_properties (wgltrace PROPERTIES
PREFIX ""
@@ -315,9 +324,6 @@ elseif (APPLE)
add_library (cgltrace SHARED
cgltrace.cpp
- glcaps.cpp
- config.cpp
- gltrace_state.cpp
)
add_dependencies (cgltrace glproc)
@@ -332,9 +338,8 @@ elseif (APPLE)
)
target_link_libraries (cgltrace
- glhelpers
+ gltrace_common
glproc_gl
- trace
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
)
@@ -359,9 +364,6 @@ elseif (X11_FOUND)
add_library (glxtrace SHARED
glxtrace.cpp
- glcaps.cpp
- config.cpp
- gltrace_state.cpp
dlsym.cpp
)
@@ -373,9 +375,8 @@ elseif (X11_FOUND)
)
target_link_libraries (glxtrace
- glhelpers
+ gltrace_common
glproc_gl
- trace
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
)
@@ -406,9 +407,6 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
add_library (egltrace SHARED
egltrace.cpp
- glcaps.cpp
- config.cpp
- gltrace_state.cpp
dlsym.cpp
)
@@ -420,9 +418,8 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
)
target_link_libraries (egltrace
- glhelpers
+ gltrace_common
glproc_egl
- trace
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
)