]> git.cworth.org Git - vogl/blob - src/vogltrace/CMakeLists.txt
UI: Fix one of the 'No matching signal' errors that are output when vogleditor starts
[vogl] / src / vogltrace / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8)
2 project(vogltrace)
3
4 option(VOGLTRACE_NO_PUBLIC_EXPORTS "Don't define any public GL exports in libvogltraceXX.so, this .so will only be useful for manual loading" FALSE)
5
6 include("${SRC_DIR}/build_options.cmake")
7 find_package(Threads)
8 if (NOT CMAKE_USE_PTHREADS_INIT)
9     message(ERROR "pthread not found")
10 endif ()
11 find_package(X11 REQUIRED)
12
13 include_directories(${CMAKE_CURRENT_BINARY_DIR})
14
15 add_compiler_flag("-DVOGL_REMOTING")
16
17 set(SRC_LIST
18     ${SRC_LIST}
19     vogl_trace.cpp
20     vogl_intercept.cpp
21     vogl_remote.cpp
22     ${SRC_DIR}/common/channel.cpp
23     ${SRC_DIR}/common/mtqueue.cpp
24     ${SRC_DIR}/common/channelmgr.cpp
25     ${SRC_DIR}/common/toclientmsg.cpp
26     ${SRC_DIR}/common/pinggame.cpp
27 )
28
29 if (VOGLTRACE_NO_PUBLIC_EXPORTS)
30         message("libvogltrace.so will NOT define GL/GLX public exports")
31     add_compiler_flag("-DNO_PUBLIC_EXPORTS")
32 else()
33         message("libvogltrace.so will define GL/GLX public exports")
34 endif()
35
36 include_directories(
37     ${SRC_DIR}/libbacktrace
38     ${SRC_DIR}/extlib/loki/include/loki
39     ${SRC_DIR}/voglcommon
40     ${CMAKE_BINARY_DIR}/voglinc
41     ${SRC_DIR}/voglcore
42     ${SRC_DIR}/libtelemetry
43     )
44
45 # Not sure if -Wl,-Bsymbolic is needed or useful?
46 add_shared_linker_flag("-Wl,-Bsymbolic")
47 add_shared_linker_flag("-Wl,--version-script=${PROJECT_SOURCE_DIR}/libvogltrace_linker_script.txt")
48
49 add_library(${PROJECT_NAME} SHARED ${SRC_LIST})
50 add_dependencies(${PROJECT_NAME} voglgen_make_inc)
51
52 target_link_libraries(${PROJECT_NAME}
53     ${TELEMETRY_LIBRARY}
54     backtrace
55     voglcommon
56     voglcore
57     ${CMAKE_THREAD_LIBS_INIT}
58     ${CMAKE_DL_LIBS}
59     ${X11_LIBRARIES}
60     rt
61     turbojpeg
62     )
63
64 build_options_finalize()
65