-
-
Notifications
You must be signed in to change notification settings - Fork 849
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oculus plugin: Add minimal documentation
- Loading branch information
Showing
3 changed files
with
85 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
INCLUDE_DIRECTORIES( | ||
. | ||
${CMAKE_BINARY_DIR}/plugins/Oculus/src | ||
) | ||
SET(OCULUS_SDK_PATH "" CACHE PATH "Path to Oculus SDK") | ||
|
||
LINK_DIRECTORIES(/src) | ||
|
||
SET(Oculus_SRCS | ||
Oculus.hpp | ||
Oculus.cpp | ||
${OCULUS_SDK_PATH}/LibOVR/Shim/OVR_CAPI_Util.cpp | ||
) | ||
IF (IS_DIRECTORY ${OCULUS_SDK_PATH}) | ||
|
||
SET(extLinkerOption ${OPENGL_LIBRARIES}) | ||
MESSAGE(STATUS "Oculus SDK found.") | ||
|
||
SET(OCULUS_SDK_PATH "" CACHE FILEPATH "Path to Oculus SDK") | ||
INCLUDE_DIRECTORIES(${OCULUS_SDK_PATH}/LibOVR/Include) | ||
INCLUDE_DIRECTORIES(${OCULUS_SDK_PATH}/LibOVR/Include | ||
. | ||
${CMAKE_BINARY_DIR}/plugins/Oculus/src | ||
) | ||
|
||
ADD_LIBRARY(Oculus-static STATIC ${Oculus_SRCS}) | ||
SET_TARGET_PROPERTIES(Oculus-static PROPERTIES OUTPUT_NAME "Oculus") | ||
LINK_DIRECTORIES(/src) | ||
|
||
TARGET_LINK_LIBRARIES(Oculus-static Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets) | ||
TARGET_LINK_LIBRARIES(Oculus-static ${OCULUS_SDK_PATH}/LibOVR/Lib/Windows/x64/Release/VS2015/libOVR.lib ws2_32) | ||
SET(Oculus_SRCS | ||
Oculus.hpp | ||
Oculus.cpp | ||
${OCULUS_SDK_PATH}/LibOVR/Shim/OVR_CAPI_Util.cpp | ||
) | ||
|
||
SET(extLinkerOption ${OPENGL_LIBRARIES}) | ||
|
||
ADD_LIBRARY(Oculus-static STATIC ${Oculus_SRCS}) | ||
SET_TARGET_PROPERTIES(Oculus-static PROPERTIES OUTPUT_NAME "Oculus") | ||
|
||
TARGET_LINK_LIBRARIES(Oculus-static Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::OpenGL) | ||
TARGET_LINK_LIBRARIES(Oculus-static ${OCULUS_SDK_PATH}/LibOVR/Lib/Windows/x64/Release/VS2017/libOVR.lib ws2_32) | ||
|
||
SET_TARGET_PROPERTIES(Oculus-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN") | ||
ADD_DEPENDENCIES(AllStaticPlugins Oculus-static) | ||
SET_TARGET_PROPERTIES(Oculus-static PROPERTIES FOLDER "plugins/Oculus") | ||
|
||
ELSE(IS_DIRECTORY ${OCULUS_SDK_PATH}) | ||
MESSAGE(STATUS "Oculus SDK not found! Building without plugin. Set OCULUS_SDK_PATH in CMakeCache.txt!") | ||
|
||
ENDIF (IS_DIRECTORY ${OCULUS_SDK_PATH}) | ||
|
||
SET_TARGET_PROPERTIES(Oculus-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN") | ||
ADD_DEPENDENCIES(AllStaticPlugins Oculus-static) | ||
SET_TARGET_PROPERTIES(Oculus-static PROPERTIES FOLDER "plugins/Oculus") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters