mirror of https://github.com/bjornbytes/lovr.git
Improve compilation UX;
This commit is contained in:
parent
2267396e5a
commit
2b11142970
|
@ -76,15 +76,17 @@ if(WIN32)
|
||||||
$<TARGET_FILE_DIR:lovr>
|
$<TARGET_FILE_DIR:lovr>
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
if(EXISTS ${OPENVR_DIR})
|
if(DEFINED OPENVR_DIR)
|
||||||
include_directories(${OPENVR_DIR}/headers)
|
get_filename_component(FULL_OPENVR_DIR ${OPENVR_DIR} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
|
||||||
|
message(STATUS "Setting OpenVR root directory to ${FULL_OPENVR_DIR}")
|
||||||
|
include_directories(${FULL_OPENVR_DIR}/headers)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(LOVR_OPENVR ${OPENVR_DIR}/lib/osx32/libopenvr_api.dylib)
|
set(LOVR_OPENVR ${FULL_OPENVR_DIR}/lib/osx32/libopenvr_api.dylib)
|
||||||
else()
|
else()
|
||||||
set(LOVR_OPENVR ${OPENVR_DIR}/lib/linux32/libopenvr_api.so)
|
set(LOVR_OPENVR ${FULL_OPENVR_DIR}/lib/linux32/libopenvr_api.so)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Please specify the absolute location of OpenVR (-DOPENVR_DIR=/path/to/openvr)")
|
message(FATAL_ERROR "Please specify the location of OpenVR (-DOPENVR_DIR=/path/to/openvr)")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#include "vive.h"
|
#include "vive.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#ifndef WIN32
|
||||||
|
#define __stdcall
|
||||||
|
#endif
|
||||||
#include <openvr_capi.h>
|
#include <openvr_capi.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "../util.h"
|
#include "../util.h"
|
||||||
|
|
Loading…
Reference in New Issue