@@ -125,6 +125,10 @@ else()
125
125
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
126
126
set (PLATFORM_LINUX TRUE CACHE INTERNAL "Target platform: Linux" )
127
127
message ("Target platform: Linux " ${ARCH} )
128
+ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" )
129
+ set (PLATFORM_LINUX TRUE CACHE INTERNAL "Target platform: Linux" )
130
+ set (PLATFORM_FREEBSD TRUE CACHE INTERNAL "Target platform: FreeBSD" )
131
+ message ("Target platform: FreeBSD " ${ARCH} )
128
132
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
129
133
if (IOS)
130
134
set (PLATFORM_IOS TRUE CACHE INTERNAL "Target platform: iOS" )
@@ -197,7 +201,11 @@ elseif(PLATFORM_LINUX)
197
201
set (GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on Linux platform" )
198
202
set (VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is supported on Linux platform" )
199
203
set (ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Linux platform" )
200
- target_compile_definitions (Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1)
204
+ if (PLATFORM_FREEBSD)
205
+ target_compile_definitions (Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1 PLATFORM_FREEBSD=1)
206
+ else ()
207
+ target_compile_definitions (Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1)
208
+ endif ()
201
209
elseif (PLATFORM_MACOS)
202
210
set (GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on MacOS platform" )
203
211
set (VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is enabled through MoltenVK on MacOS platform" )
@@ -520,6 +528,10 @@ else()
520
528
set (DILIGENT_INSTALL_PDB OFF )
521
529
endif ()
522
530
531
+ if (PLATFORM_FREEBSD AND EXISTS /usr/local/include )
532
+ target_include_directories (Diligent-BuildSettings SYSTEM AFTER INTERFACE /usr/local/include )
533
+ endif ()
534
+
523
535
file (RELATIVE_PATH DILIGENT_CORE_DIR "${CMAKE_SOURCE_DIR} " "${CMAKE_CURRENT_SOURCE_DIR} " )
524
536
SET (DILIGENT_CORE_DIR ${DILIGENT_CORE_DIR} CACHE INTERNAL "Diligent Core installation directory" )
525
537
0 commit comments