refactor packaging

This commit is contained in:
Crispy 2023-05-04 22:27:47 +02:00
parent 22496fcc35
commit 2c0386b141
5 changed files with 11 additions and 5 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
sinpin_vr
.vscode/
*.zip
*.tar.xz

View file

@ -1,17 +1,22 @@
VERSION=v0.2.2
VERSION=v0.2.3
CXX := g++
# CXX := clang++
CPPFLAGS := -g -Wall -std=c++17
LFLAGS := -lX11 -lXrandr -lXtst -lglfw -lGL
OVR := -Lopenvr -lopenvr_api
OVR := -Llib -lopenvr_api
TARGET := ./sinpin_vr
build:
$(CXX) src/*.cpp $(CPPFLAGS) $(LFLAGS) -Wl,-rpath,'$$ORIGIN/openvr' $(OVR) -o $(TARGET)
$(CXX) src/*.cpp $(CPPFLAGS) $(LFLAGS) -Wl,-rpath,'$$ORIGIN/lib' $(OVR) -o $(TARGET)
release: build
zip -r sinpin_vr-$(VERSION).zip sinpin_vr bindings openvr/libopenvr_api.so
mkdir -p sinpin-vr/lib
cp lib/libopenvr_api.so sinpin-vr/lib
cp -r bindings sinpin-vr
cp sinpin_vr sinpin-vr
tar -caf sinpin-vr-$(VERSION).tar.xz sinpin-vr
rm -rf sinpin-vr
run: build
$(TARGET)

View file

@ -1,6 +1,6 @@
#pragma once
#include "../openvr/openvr.h"
#include "../lib/openvr.h"
#include <glm/glm.hpp>
typedef vr::TrackedDeviceIndex_t TrackerID;