1 cmake_minimum_required(VERSION 2.8)
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)
6 include("${SRC_DIR}/build_options.cmake")
8 if (NOT CMAKE_USE_PTHREADS_INIT)
9 message(ERROR "pthread not found")
11 find_package(X11 REQUIRED)
13 include_directories(${CMAKE_CURRENT_BINARY_DIR})
15 add_compiler_flag("-DVOGL_REMOTING")
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
29 if (VOGLTRACE_NO_PUBLIC_EXPORTS)
30 message("libvogltrace.so will NOT define GL/GLX public exports")
31 add_compiler_flag("-DNO_PUBLIC_EXPORTS")
33 message("libvogltrace.so will define GL/GLX public exports")
37 ${SRC_DIR}/libbacktrace
38 ${SRC_DIR}/extlib/loki/include/loki
40 ${CMAKE_BINARY_DIR}/voglinc
42 ${SRC_DIR}/libtelemetry
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")
49 add_library(${PROJECT_NAME} SHARED ${SRC_LIST})
50 add_dependencies(${PROJECT_NAME} voglgen_make_inc)
52 target_link_libraries(${PROJECT_NAME}
57 ${CMAKE_THREAD_LIBS_INIT}
64 build_options_finalize()