aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/CMakeLists.txt
blob: 560f80cfd312e3a8e20e559e2101a2f2ea905bae (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
project (CORE_OculusVR)

include_directories(Include Src Src/Kernel Src/Util)

set(SOURCE_FILES
    Src/Kernel/OVR_Alg.cpp
    Src/Kernel/OVR_Allocator.cpp
    Src/Kernel/OVR_Atomic.cpp
    Src/Kernel/OVR_File.cpp
    Src/Kernel/OVR_FileFILE.cpp
    Src/Kernel/OVR_Log.cpp
    Src/Kernel/OVR_Math.cpp
    Src/Kernel/OVR_RefCount.cpp
    Src/Kernel/OVR_Std.cpp
    Src/Kernel/OVR_String.cpp
    Src/Kernel/OVR_String_FormatUtil.cpp
    Src/Kernel/OVR_String_PathUtil.cpp
    Src/Kernel/OVR_SysFile.cpp
    Src/Kernel/OVR_System.cpp
    Src/Kernel/OVR_Timer.cpp
    Src/Kernel/OVR_UTF8Util.cpp
    Src/OVR_DeviceHandle.cpp
    Src/OVR_DeviceImpl.cpp
    Src/OVR_JSON.cpp
    Src/OVR_LatencyTestImpl.cpp
    Src/OVR_Profile.cpp
    Src/OVR_SensorFilter.cpp
    Src/OVR_SensorFusion.cpp
    Src/OVR_SensorImpl.cpp
    Src/OVR_ThreadCommandQueue.cpp
    Src/Util/Util_LatencyTest.cpp
    Src/Util/Util_Render_Stereo.cpp
)

set(HEADER_FILES
    Include/OVR.h
    Include/OVRVersion.h 
    Src/Kernel/OVR_Alg.h
    Src/Kernel/OVR_Allocator.h
    Src/Kernel/OVR_Array.h
    Src/Kernel/OVR_Atomic.h
    Src/Kernel/OVR_Color.h
    Src/Kernel/OVR_ContainerAllocator.h
    Src/Kernel/OVR_File.h
    Src/Kernel/OVR_Hash.h
    Src/Kernel/OVR_KeyCodes.h
    Src/Kernel/OVR_List.h
    Src/Kernel/OVR_Log.h
    Src/Kernel/OVR_Math.h
    Src/Kernel/OVR_RefCount.h
    Src/Kernel/OVR_Std.h
    Src/Kernel/OVR_String.h
    Src/Kernel/OVR_SysFile.h
    Src/Kernel/OVR_System.h
    Src/Kernel/OVR_Timer.h
    Src/Kernel/OVR_Threads.h
    Src/Kernel/OVR_Types.h
    Src/Kernel/OVR_UTF8Util.h
    Src/OVR_Device.h
    Src/OVR_DeviceConstants.h
    Src/OVR_DeviceHandle.h
    Src/OVR_DeviceImpl.h
    Src/OVR_DeviceMessages.h
    Src/OVR_HIDDevice.h
    Src/OVR_HIDDeviceBase.h
    Src/OVR_HIDDeviceImpl.h
    Src/OVR_JSON.h
    Src/OVR_LatencyTestImpl.h
    Src/OVR_Profile.h
    Src/OVR_SensorFilter.h
    Src/OVR_SensorFusion.h
    Src/OVR_SensorImpl.h
    Src/OVR_ThreadCommandQueue.h
    Src/Util/Util_LatencyTest.h
    Src/Util/Util_Render_Stereo.h
)

if(WIN32)
    list(APPEND SOURCE_FILES 
        Src/Kernel/OVR_ThreadsWinAPI.cpp
        Src/OVR_Win32_DeviceManager.cpp
        Src/OVR_Win32_DeviceStatus.cpp
        Src/OVR_Win32_HIDDevice.cpp
        Src/OVR_Win32_HMDDevice.cpp
        Src/OVR_Win32_SensorDevice.cpp
    )
    list(APPEND HEADER_FILES
        Src/OVR_Win32_DeviceManager.h
        Src/OVR_Win32_DeviceStatus.h
        Src/OVR_Win32_HIDDevice.h
        Src/OVR_Win32_HMDDevice.h
        Src/OVR_Win32_SensorDevice.h
    )
elseif(APPLE)
    list(APPEND SOURCE_FILES 
        Src/Kernel/OVR_ThreadsPthread.cpp
        Src/OVR_OSX_DeviceManager.cpp
        Src/OVR_OSX_HIDDevice.cpp
        Src/OVR_OSX_HMDDevice.cpp
        Src/OVR_OSX_SensorDevice.cpp
    )
    list(APPEND HEADER_FILES
        Src/OVR_OSX_DeviceManager.h
        Src/OVR_OSX_HIDDevice.h
        Src/OVR_OSX_HMDDevice.h
    )
else()
    list(APPEND SOURCE_FILES 
        Src/Kernel/OVR_ThreadsPthread.cpp
        Src/OVR_Linux_DeviceManager.cpp
        Src/OVR_Linux_HIDDevice.cpp
        Src/OVR_Linux_HMDDevice.cpp
        Src/OVR_Linux_SensorDevice.cpp
    )
    list(APPEND HEADER_FILES
        Src/OVR_Linux_DeviceManager.h
        Src/OVR_Linux_HIDDevice.h
        Src/OVR_Linux_HMDDevice.h
    )
    list(APPEND EXTRA_LIBS
        EDID
    )
    include_directories(${LIB_EDID_SOURCE_DIR})
endif()

if(WIN32)
    SET(OculusVR_EXTRA_LIBS setupapi winmm)
elseif(APPLE)
    # FIXME ???
else()
    # FIXME switch to pkg-config for this?
    SET(OculusVR_EXTRA_LIBS pthread udev X11 Xinerama)
endif()

add_library(OculusVR STATIC ${SOURCE_FILES} ${HEADER_FILES})
target_link_libraries(OculusVR ${OculusVR_EXTRA_LIBS})