Fixing examples

This commit is contained in:
Brad Davis 2014-12-05 01:57:35 -08:00
parent 66c94e92f7
commit d8e93b120a
6 changed files with 21 additions and 73 deletions

View File

@ -3,9 +3,8 @@ project(OculusSDK)
cmake_minimum_required(VERSION 2.8)
# Support our own custom modules
list(APPEND CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMake/Modules
)
include(cmake/defaults.cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
# First for the generic no-config case (e.g. with mingw)
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output )
@ -65,4 +64,10 @@ if(OCULUS_BUILD_SAMPLES)
add_subdirectory (Samples/OculusWorldDemo )
set_target_properties(OculusWorldDemo PROPERTIES FOLDER "Samples")
if (WIN32)
add_subdirectory (Samples/OculusRoomTiny )
set_target_properties(OculusRoomTiny PROPERTIES FOLDER "Samples")
endif()
endif()

View File

@ -90,6 +90,6 @@ else()
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DOVR_BUILD_DEBUG")
add_library(OculusVR SHARED ${SOURCE_FILES} ${PLATFORM_SOURCE_FILES})
add_library(OculusVR ${SOURCE_FILES} ${PLATFORM_SOURCE_FILES})
target_link_libraries(OculusVR ${EXTRA_LIBS})
set(OVR_LIBRARIES ${EXTRA_LIBS} CACHE STRING "Dependencies of OculusVR")

View File

@ -1,38 +1,19 @@
project(OculusRoomTiny)
set(SOURCE_FILES
# MessageBox.cpp
# MessageBox.h
OculusRoomTiny.cpp
OculusRoomTiny.h
OculusRoomModel.cpp
RenderTiny_Device.cpp
RenderTiny_Device.h
RenderTiny_GL_Device.cpp
RenderTiny_GL_Device.h
)
set(EXTRA_LIBS
OculusVR
glew
glfw
${GLFW_LIBRARIES}
)
if(WIN32)
add_executable(${PROJECT_NAME} WIN32 ${SOURCE_FILES} )
elseif(APPLE)
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${SOURCE_FILES} )
else()
add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
file(GLOB SOURCE_FILES *.cpp *.h)
list(APPEND EXTRA_LIBS OculusVR)
if (WIN32)
find_package( DirectX REQUIRED)
list(APPEND EXTRA_LIBS ${DirectX_D3D10_LIBRARY})
list(APPEND EXTRA_LIBS ${DirectX_D3DX10_LIBRARY})
list(APPEND EXTRA_LIBS ${DirectX_D3D10_1_LIBRARY})
list(APPEND EXTRA_LIBS ${DirectX_D3D11_LIBRARY})
list(APPEND EXTRA_LIBS ${DirectX_D3DX11_LIBRARY})
list(APPEND EXTRA_LIBS d3dcompiler dxgi dxguid)
endif()
add_executable(${PROJECT_NAME} WIN32 ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${EXTRA_LIBS})

View File

@ -1,26 +0,0 @@
project(SensorBoxTest)
set(EXTRA_LIBS
OculusVR
CommonSrc
)
set(SOURCE_FILES
SensorBoxTest.cpp
)
if (WIN32)
add_executable(SensorBoxTest WIN32 ${SOURCE_FILES})
elseif (APPLE)
add_executable(SensorBoxTest MACOSX_BUNDLE ${SOURCE_FILES})
else()
add_executable(SensorBoxTest ${SOURCE_FILES})
endif()
target_link_libraries(SensorBoxTest ${EXTRA_LIBS})

View File

@ -1,12 +0,0 @@
project(TestSensor)
set(EXTRA_LIBS
OculusVR
)
set(SOURCE_FILES
TestSensor.cpp
)
add_executable(TestSensor ${SOURCE_FILES})
target_link_libraries(TestSensor ${EXTRA_LIBS})

2
cmake

@ -1 +1 @@
Subproject commit 3c95590d7d868ae52ae829fee6a35028dadf5f07
Subproject commit daa5a0f1586b5852b6dd2b08cea214d3eea0c007