From 044561b4ee75f116db0fff45f173e822fefb9c89 Mon Sep 17 00:00:00 2001 From: Colin Sherratt Date: Fri, 9 May 2014 20:32:53 -0600 Subject: [PATCH] -updated cgmath to master -Updated some stale code. -removed steamworks from the default build -Added missing frameworks from ovr-rs -add missing libudev-dev -add missing xrandr --- .travis.yml | 1 + configure | 17 +++++++++++------ modules/cgmath | 2 +- src/oculus-info/main.rs | 2 +- src/oculus-vr/lib.rs | 4 ++++ src/steamworks-info/main.rs | 2 +- src/steamworks-vr/lib.rs | 10 +++++----- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0d745d2..cf066d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ install: + - sudo apt-get install libudev-dev libxrandr-dev - wget http://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz - tar xzf rust-nightly-x86_64-unknown-linux-gnu.tar.gz - export PATH=$PATH:$(pwd)/rust-nightly-x86_64-unknown-linux-gnu/bin diff --git a/configure b/configure index 3dcffa0..e5341a3 100755 --- a/configure +++ b/configure @@ -170,13 +170,18 @@ def write_makefile(modules): modules = [Bin("oculus-info", ["oculus-vr"]), - Lib("oculus-vr", ["cgmath", "libovr_wrapper.a"]), - LibMakefile("libovr_wrapper.a", "src/oculus-vr/", "src/oculus-vr/libovr_wrapper.a", ["libovr.a"]), - LibMakefile("libovr.a", "thirdparty/OculusSDK/", "thirdparty/OculusSDK/LibOVR/Lib/Linux/Release/x86_64/libovr.a"), - Bin("steamworks-info", ["steamworks-vr"], other_flags="-L thirdparty/Steamworks/redistributable_bin/linux64/"), - Lib("steamworks-vr", ["cgmath", "libsteamvr_wrapper.a"]), - LibMakefile("libsteamvr_wrapper.a", "src/steamworks-vr/", "src/steamworks-vr/libsteamvr_wrapper.a"), + LibMakefile("libovr_wrapper.a", "src/oculus-vr/", "src/oculus-vr/libovr_wrapper.a", ["cgmath", "libOculusVR.a"]), + LibCMake("libOculusVR.a", "modules/OculusSDK/LibOVR/", "modules/OculusSDK/LibOVR/libOculusVR.a"), + #Bin("steamworks-info", ["steamworks-vr"], other_flags="-L thirdparty/Steamworks/redistributable_bin/linux64/"), + #Lib("steamworks-vr", ["cgmath", "libsteamvr_wrapper.a"]), + #LibMakefile("libsteamvr_wrapper.a", "src/steamworks-vr/", "src/steamworks-vr/libsteamvr_wrapper.a"), Lib("cgmath")] +if platform.system() == "Linux": + modules += [Lib("oculus-vr", ["libOculusVR.a", "libedid.a", "cgmath", "libovr_wrapper.a"]), + LibCMake("libedid.a", "modules/OculusSDK/3rdParty/EDID/", "modules/OculusSDK/3rdParty/EDID/libedid.a")] + +elif platform.system() == "Darwin": + modules += [Lib("oculus-vr", ["libOculusVR.a", "cgmath", "libovr_wrapper.a"])] write_makefile(modules) \ No newline at end of file diff --git a/modules/cgmath b/modules/cgmath index 0aa4011..29b8f4e 160000 --- a/modules/cgmath +++ b/modules/cgmath @@ -1 +1 @@ -Subproject commit 0aa401109afd3e580eea53a529b5cb899db2e580 +Subproject commit 29b8f4ea166ac36db4b06814eb198458cf905e11 diff --git a/src/oculus-info/main.rs b/src/oculus-info/main.rs index 7f8d4c0..e75a19d 100644 --- a/src/oculus-info/main.rs +++ b/src/oculus-info/main.rs @@ -1,4 +1,4 @@ -#[crate_id = "oculus-info#0.1"]; +#![crate_id = "oculus-info#0.1"] extern crate ovr = "oculus-vr"; diff --git a/src/oculus-vr/lib.rs b/src/oculus-vr/lib.rs index af6ac0d..e329e9e 100644 --- a/src/oculus-vr/lib.rs +++ b/src/oculus-vr/lib.rs @@ -22,12 +22,16 @@ use cgmath::angle::rad; #[link(name="udev")] #[link(name="Xinerama")] #[link(name="edid")] +#[link(name="Xrandr")] extern {} #[cfg(target_os = "macos")] #[link(name="ovr_wrapper")] #[link(name="OculusVR")] #[link(name="stdc++")] +#[link(name = "Cocoa", kind = "framework")] +#[link(name = "IOKit", kind = "framework")] +#[link(name = "CoreFoundation", kind = "framework")] extern {} pub mod ll { diff --git a/src/steamworks-info/main.rs b/src/steamworks-info/main.rs index 7dd5ca0..1753727 100644 --- a/src/steamworks-info/main.rs +++ b/src/steamworks-info/main.rs @@ -1,4 +1,4 @@ -#[crate_id = "steamworks-info#0.1"]; +#![crate_id = "steamworks-info#0.1"] extern crate vr = "steamworks-vr"; diff --git a/src/steamworks-vr/lib.rs b/src/steamworks-vr/lib.rs index bc56961..2059d7e 100644 --- a/src/steamworks-vr/lib.rs +++ b/src/steamworks-vr/lib.rs @@ -1,8 +1,8 @@ -#[allow(non_camel_case_types)]; +#![allow(non_camel_case_types)] -#[crate_id = "steamworks-vr#0.1"]; -#[crate_type = "lib"]; -#[feature(link_args)]; +#![crate_id = "steamworks-vr#0.1"] +#![crate_type = "lib"] +#![feature(link_args)] extern crate cgmath; @@ -121,7 +121,7 @@ pub mod ll { pub struct Hmd { - priv ptr: *ll::IHmd + ptr: *ll::IHmd } pub enum HmdErrorInit