From ab1c72570524c550206b6a44aa464c00a9c28ef5 Mon Sep 17 00:00:00 2001 From: bjorn Date: Wed, 10 Aug 2016 01:18:45 -0700 Subject: [PATCH] Update Windows build; --- CMakeLists.txt | 20 ++++++-------------- README.md | 24 ++++++++++++++++++++---- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6d6b921..eabd966e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index c775b74c..93af717a 100644 --- a/README.md +++ b/README.md @@ -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