File tree Expand file tree Collapse file tree
Tutorials/Tutorial00_HelloLinux Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ if(PLATFORM_ANDROID)
130130 add_subdirectory (Android /HelloAR )
131131endif ()
132132
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))
134134 add_subdirectory (UnityPlugin )
135135endif ()
136136
Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ elseif(PLATFORM_ANDROID)
7272 include/SampleApp.hpp
7373 )
7474elseif (PLATFORM_LINUX)
75+ if (PLATFORM_FREEBSD)
76+ if (EXISTS /usr/local/include)
77+ include_directories (/usr/local/include )
78+ endif ()
79+ endif ()
7580 set (SOURCE
7681 src/Linux /InputControllerLinux.cpp
7782 src/Linux /SampleAppLinux.cpp
@@ -189,7 +194,14 @@ if(PLATFORM_UNIVERSAL_WINDOWS)
189194elseif (PLATFORM_ANDROID)
190195 target_link_libraries (Diligent-SampleBase PRIVATE GLESv3 PUBLIC native_app_glue )
191196elseif (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} )
193205elseif (PLATFORM_MACOS OR PLATFORM_IOS)
194206
195207endif ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ endif()
2222
2323if (PLATFORM_WIN32 AND D3D11_SUPPORTED AND D3D12_SUPPORTED)
2424 if (TARGET Diligent-TextureLoader)
25- add_subdirectory (Asteroids )
25+ add_subdirectory (Asteroids )
2626 else ()
2727 message ("Unable to find Diligent-TextureLoader target: Asteroids demo will be disabled" )
2828 endif ()
Original file line number Diff line number Diff line change @@ -83,6 +83,12 @@ if(MSVC)
8383 )
8484endif ()
8585
86+ if (PLATFORM_FREEBSD)
87+ if (EXISTS /usr/local/include)
88+ include_directories (/usr/local/include )
89+ endif ()
90+ endif ()
91+
8692if (PLATFORM_WIN32 OR PLATFORM_LINUX)
8793 # Copy assets to target folder
8894 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)
22
33project (Tutorial00_HelloLinux CXX )
44
5+ if (PLATFORM_FREEBSD)
6+ if (EXISTS /usr/local/include)
7+ include_directories (/usr/local/include )
8+ endif ()
9+ endif ()
10+
511set (SOURCE
612 src/Tutorial00_HelloLinux.cpp
713)
@@ -22,11 +28,22 @@ set_target_properties(Tutorial00_HelloLinux PROPERTIES
2228)
2329
2430target_link_libraries (Tutorial00_HelloLinux PRIVATE Diligent-BuildSettings )
25-
2631if (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} )
2840endif ()
2941
3042if (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} )
3249endif ()
You can’t perform that action at this time.
0 commit comments