Update Windows build;

This commit is contained in:
bjorn 2016-08-10 01:18:45 -07:00
parent 16c5ebead0
commit ab1c725705
2 changed files with 26 additions and 18 deletions

View File

@ -3,19 +3,9 @@ project(lovr)
option(OSVR_PATH "The path to the osvr snapshot")
add_executable(lovr
src/glfw.c
src/util.c
src/shader.c
src/event.c
src/graphics.c
src/model.c
src/buffer.c
src/device.c
src/interface.c
src/lovr.c
src/main.c
)
file(GLOB_RECURSE LOVR_SRC src/*.c)
add_executable(lovr ${LOVR_SRC})
function(move_dll ARG_TARGET)
add_custom_command(TARGET lovr POST_BUILD
@ -31,7 +21,7 @@ include_directories(deps/luajit/src ${CMAKE_BINARY_DIR}/luajit)
set(LOVR_LUA liblua)
# GLEW
add_subdirectory(deps/glew/build/cmake glew)
add_subdirectory(deps/glew glew)
include_directories(deps/glew/include)
set(LOVR_GLEW glew)
@ -50,6 +40,8 @@ include(${OSVR_PATH}/lib/cmake/osvr/osvrConfig.cmake)
include_directories(${OSVR_PATH}/include)
target_link_libraries(lovr osvr::osvrClient)
target_link_libraries(lovr osvr::osvrClientKit)
target_link_libraries(lovr osvr::osvrCommon)
target_link_libraries(lovr osvr::osvrUtil)
move_dll(osvr::osvrCommon)
move_dll(osvr::osvrUtil)
move_dll(osvr::osvrClient)

View File

@ -27,20 +27,36 @@ Dependencies
- LuaJIT
- GLFW (3.2+) and OpenGL (3.2+)
- assimp
- OSVR
- OSVR-Core
Compiling
---
Windows (CMake, may be out of date):
### Windows (CMake)
- Install [Boost 1.57](http://www.boost.org/users/history/version_1_57_0.html) to `C:\local\boost_1_57_0`.
- Download an extract a pre-built [OSVR Core](http://access.osvr.com/binary/osvr-core).
- Install [lovr-deps](https://github.com/bjornbytes/lovr-deps) to the `deps` folder of the `lovr` repository:
```sh
git clone --recursive https://github.com/bjornbytes/lovr-deps
```
Finally, build using the CMake GUI or using the CMake command line. Make sure you pass the `OSVR_PATH` option:
```sh
mkdir build
cd build
cmake ..
cmake -DOSVR_PATH=/path/to/osvr-core ..
```
OSX (tup):
This should output a Visual Studio solution, which can be built using Visual Studio or by using CMake:
```sh
cmake --build .
```
### OSX (tup)
```sh
tup