]> git.cworth.org Git - vogl/blobdiff - src/vogltrace/CMakeLists.txt
Reworked src/vogltrace/CMakeLists.txt to fix issue 16;
[vogl] / src / vogltrace / CMakeLists.txt
index 818dada96aa66833f81588294ccca7c93c926712..6320b4eef8024f46eace95e91a11f3fee0216204 100644 (file)
@@ -1,14 +1,17 @@
 cmake_minimum_required(VERSION 2.8)
+project(vogltrace)
 
 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)
 
 include("${SRC_DIR}/build_options.cmake")
-
-project(vogltrace)
+find_package(Threads)
+if (NOT CMAKE_USE_PTHREADS_INIT)
+    message(ERROR "pthread not found")
+endif ()
+find_package(X11 REQUIRED)
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-
 add_compiler_flag("-DVOGL_REMOTING")
 
 set(SRC_LIST
@@ -50,11 +53,11 @@ target_link_libraries(${PROJECT_NAME}
     backtrace
     voglcommon
     voglcore
-    pthread
+    ${CMAKE_THREAD_LIBS_INIT}
     ${CMAKE_DL_LIBS}
-    X11
-    libturbojpeg.a
+    ${X11_LIBRARIES}
     rt
+    turbojpeg
     )
 
 build_options_finalize()