@@ -125,6 +125,10 @@ else()
125125 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
126126 set (PLATFORM_LINUX TRUE CACHE INTERNAL "Target platform: Linux" )
127127 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} )
128132 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
129133 if (IOS)
130134 set (PLATFORM_IOS TRUE CACHE INTERNAL "Target platform: iOS" )
@@ -197,7 +201,11 @@ elseif(PLATFORM_LINUX)
197201 set (GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on Linux platform" )
198202 set (VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is supported on Linux platform" )
199203 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 ()
201209elseif (PLATFORM_MACOS)
202210 set (GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on MacOS platform" )
203211 set (VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is enabled through MoltenVK on MacOS platform" )
@@ -520,6 +528,10 @@ else()
520528 set (DILIGENT_INSTALL_PDB OFF )
521529endif ()
522530
531+ if (PLATFORM_FREEBSD AND EXISTS /usr/local/include )
532+ target_include_directories (Diligent-BuildSettings SYSTEM AFTER INTERFACE /usr/local/include )
533+ endif ()
534+
523535file (RELATIVE_PATH DILIGENT_CORE_DIR "${CMAKE_SOURCE_DIR} " "${CMAKE_CURRENT_SOURCE_DIR} " )
524536SET (DILIGENT_CORE_DIR ${DILIGENT_CORE_DIR} CACHE INTERNAL "Diligent Core installation directory" )
525537
0 commit comments