File tree Expand file tree Collapse file tree 5 files changed +41
-6
lines changed
Tutorials/Tutorial00_HelloLinux Expand file tree Collapse file tree 5 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ if(PLATFORM_ANDROID)
130
130
add_subdirectory (Android/HelloAR )
131
131
endif ()
132
132
133
- if (NOT ${DILIGENT_BUILD_SAMPLE_BASE_ONLY} AND (D3D11_SUPPORTED OR D3D12_SUPPORTED OR GL_SUPPORTED OR GLES_SUPPORTED ))
133
+ if (NOT PLATFORM_FREEBSD AND NOT ${DILIGENT_BUILD_SAMPLE_BASE_ONLY} AND (D3D11_SUPPORTED OR D3D12_SUPPORTED OR GL_SUPPORTED OR GLES_SUPPORTED ))
134
134
add_subdirectory (UnityPlugin )
135
135
endif ()
136
136
Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ elseif(PLATFORM_ANDROID)
72
72
include /SampleApp.hpp
73
73
)
74
74
elseif (PLATFORM_LINUX )
75
+ if (PLATFORM_FREEBSD )
76
+ if (EXISTS /usr/local/include )
77
+ include_directories (/usr/local/include )
78
+ endif ()
79
+ endif ()
75
80
set (SOURCE
76
81
src/Linux/InputControllerLinux.cpp
77
82
src/Linux/SampleAppLinux.cpp
@@ -189,7 +194,14 @@ if(PLATFORM_UNIVERSAL_WINDOWS)
189
194
elseif (PLATFORM_ANDROID )
190
195
target_link_libraries (Diligent-SampleBase PRIVATE GLESv3 PUBLIC native_app_glue )
191
196
elseif (PLATFORM_LINUX )
192
- target_link_libraries (Diligent-SampleBase PRIVATE XCBKeySyms GL X11 )
197
+ if (PLATFORM_FREEBSD )
198
+ find_package (OpenGL REQUIRED )
199
+ find_package (X11 REQUIRED )
200
+ else ()
201
+ set (OPENGL_gl_LIBRARY GL )
202
+ set (X11_LIBRARIES X11 )
203
+ endif ()
204
+ target_link_libraries (Diligent-SampleBase PRIVATE XCBKeySyms ${OPENGL_gl_LIBRARY} ${X11_LIBRARIES} )
193
205
elseif (PLATFORM_MACOS OR PLATFORM_IOS )
194
206
195
207
endif ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ endif()
22
22
23
23
if (PLATFORM_WIN32 AND D3D11_SUPPORTED AND D3D12_SUPPORTED )
24
24
if (TARGET Diligent-TextureLoader )
25
- add_subdirectory (Asteroids )
25
+ add_subdirectory (Asteroids )
26
26
else ()
27
27
message ("Unable to find Diligent-TextureLoader target: Asteroids demo will be disabled" )
28
28
endif ()
Original file line number Diff line number Diff line change @@ -83,6 +83,12 @@ if(MSVC)
83
83
)
84
84
endif ()
85
85
86
+ if (PLATFORM_FREEBSD )
87
+ if (EXISTS /usr/local/include )
88
+ include_directories (/usr/local/include )
89
+ endif ()
90
+ endif ()
91
+
86
92
if (PLATFORM_WIN32 OR PLATFORM_LINUX )
87
93
# Copy assets to target folder
88
94
add_custom_command (TARGET GLFWDemo POST_BUILD
Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ cmake_minimum_required (VERSION 3.6)
2
2
3
3
project (Tutorial00_HelloLinux CXX )
4
4
5
+ if (PLATFORM_FREEBSD )
6
+ if (EXISTS /usr/local/include )
7
+ include_directories (/usr/local/include )
8
+ endif ()
9
+ endif ()
10
+
5
11
set (SOURCE
6
12
src/Tutorial00_HelloLinux.cpp
7
13
)
@@ -22,11 +28,22 @@ set_target_properties(Tutorial00_HelloLinux PROPERTIES
22
28
)
23
29
24
30
target_link_libraries (Tutorial00_HelloLinux PRIVATE Diligent-BuildSettings )
25
-
26
31
if (GL_SUPPORTED )
27
- target_link_libraries (Tutorial00_HelloLinux PRIVATE Diligent-GraphicsEngineOpenGL-shared GL X11 )
32
+ if (PLATFORM_FREEBSD )
33
+ find_package (OpenGL REQUIRED )
34
+ find_package (X11 REQUIRED )
35
+ else ()
36
+ set (OPENGL_gl_LIBRARY GL )
37
+ set (X11_LIBRARIES X11 )
38
+ endif ()
39
+ target_link_libraries (Tutorial00_HelloLinux PRIVATE Diligent-GraphicsEngineOpenGL-shared ${OPENGL_gl_LIBRARY} ${X11_LIBRARIES} )
28
40
endif ()
29
41
30
42
if (VULKAN_SUPPORTED )
31
- target_link_libraries (Tutorial00_HelloLinux PRIVATE Diligent-GraphicsEngineVk-shared xcb )
43
+ if (PLATFORM_FREEBSD )
44
+ find_library (XCB NAMES xcb REQUIRED )
45
+ else ()
46
+ set (XCB xcb )
47
+ endif ()
48
+ target_link_libraries (Tutorial00_HelloLinux PRIVATE Diligent-GraphicsEngineVk-shared ${XCB} )
32
49
endif ()
You can’t perform that action at this time.
0 commit comments