@@ -8,6 +8,15 @@ pkg_check_modules (GST REQUIRED gstreamer-1.0)
8
8
pkg_check_modules (GST_GL REQUIRED gstreamer-gl-1.0 )
9
9
pkg_check_modules (GST_VIDEO REQUIRED gstreamer-video-1.0 )
10
10
pkg_check_modules (GLIB REQUIRED glib-2.0 )
11
+ pkg_check_modules (GIO REQUIRED gio-2.0 )
12
+ pkg_check_modules (OPENHMD REQUIRED openhmd )
13
+
14
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99" )
15
+
16
+ add_definitions (-DVERSION= "0.1.0" )
17
+ add_definitions (-DPACKAGE= "gst-plugins-vr" )
18
+ add_definitions (-DPACKAGE_NAME= "GStreamer Plugins VR" )
19
+ add_definitions (-DGST_PACKAGE_ORIGIN= "c" )
11
20
12
21
include_directories (
13
22
${GRAPHENE_INCLUDE_DIRS}
@@ -19,19 +28,40 @@ include_directories(
19
28
${CMAKE_SOURCE_DIR} /build
20
29
)
21
30
31
+ set (SHADER_DIR ${CMAKE_SOURCE_DIR} /gpu )
32
+
33
+ execute_process (
34
+ WORKING_DIRECTORY ${SHADER_DIR}
35
+ COMMAND glib-compile-resources --target=shaders.c --sourcedir=. --generate-source shaders.gresource.xml )
36
+
22
37
file (GLOB_RECURSE GST_3D_C ${CMAKE_SOURCE_DIR} /gst-libs/gst/3d/*.c )
23
38
file (GLOB_RECURSE GST_3D_H ${CMAKE_SOURCE_DIR} /gst-libs/gst/3d/*.h )
24
39
25
- add_library (gst3d ${SOURCES} ${GST_3D_C} ${GST_3D_H} )
26
- target_link_libraries (gst3d
40
+ add_library (gst3d-1.0 SHARED ${SOURCES} ${GST_3D_C} ${GST_3D_H} )
41
+ add_library (gst3d-1.0_static STATIC ${SOURCES} ${GST_3D_C} ${GST_3D_H} )
42
+
43
+ target_link_libraries (gst3d-1.0
27
44
${GRAPHENE_LIBRARIES}
28
45
${GST_LIBRARIES}
29
46
${GLIB_LIBRARIES}
30
47
${GST_GL_LIBRARIES}
31
48
${GST_VIDEO_LIBRARIES}
49
+ ${GIO_LIBRARIES}
50
+ ${OPENHMD_LIBRARIES}
32
51
)
33
52
34
53
file (GLOB_RECURSE GST_VR_C ${CMAKE_SOURCE_DIR} /gst/vr/*.c )
35
54
file (GLOB_RECURSE GST_VR_H ${CMAKE_SOURCE_DIR} /gst/vr/*.h )
36
- add_library (gstvr ${GST_VR_C} ${GST_VR_H} )
37
- target_link_libraries (gstvr gst3d )
55
+ add_library (gstvrplugins SHARED ${GST_VR_C} ${GST_VR_H} ${CMAKE_SOURCE_DIR} /gpu/shaders.c )
56
+ add_library (gstvrplugins_static STATIC ${GST_VR_C} ${GST_VR_H} ${CMAKE_SOURCE_DIR} /gpu/shaders.c )
57
+ target_link_libraries (gstvrplugins gst3d-1.0 )
58
+
59
+
60
+ install (TARGETS gstvrplugins gstvrplugins_static
61
+ LIBRARY DESTINATION lib/gstreamer-1.0
62
+ RUNTIME DESTINATION bin
63
+ ARCHIVE DESTINATION lib/gstreamer-1.0 )
64
+ install (TARGETS gst3d-1.0 gst3d-1.0_static
65
+ LIBRARY DESTINATION lib
66
+ RUNTIME DESTINATION bin
67
+ ARCHIVE DESTINATION lib )
0 commit comments