summaryrefslogtreecommitdiffstats
path: root/Samples/OculusWorldDemo/CMakeLists.txt
blob: 9d8c6b19cfd3bac2abefd9af397032e403ccfa6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
project(OculusWorldDemo)

set(EXTRA_LIBS 
	OculusVR
	CommonSrc
	TinyXML2
)

set(SOURCE_FILES 
    OculusWorldDemo.cpp
    Player.cpp
)

file(GLOB_RECURSE ASSET_FILES Assets/Tuscany/*)

if (WIN32)

    add_executable(OculusWorldDemo WIN32 ${SOURCE_FILES})

	add_custom_command(TARGET OculusWorldDemo POST_BUILD
		COMMAND ${CMAKE_COMMAND} -E copy_directory
        ${CMAKE_CURRENT_SOURCE_DIR}/Assets  ${CMAKE_CURRENT_BINARY_DIR}/Assets)

elseif (APPLE)

    list(APPEND SOURCE_FILES ${ASSET_FILES})

    set_source_files_properties(${ASSET_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/Assets/Tuscany)

    add_executable(OculusWorldDemo MACOSX_BUNDLE ${SOURCE_FILES})

else()

    add_executable(OculusWorldDemo ${SOURCE_FILES})

	add_custom_command(TARGET OculusWorldDemo POST_BUILD
		COMMAND ${CMAKE_COMMAND} -E copy_directory
        ${CMAKE_CURRENT_SOURCE_DIR}/Assets  ${CMAKE_CURRENT_BINARY_DIR}/Assets)

endif()

target_link_libraries(OculusWorldDemo ${EXTRA_LIBS})