Skip to content

Commit

Permalink
Placing FreeBSD-specific stuffs into Diligent-BuildSettings (as reque…
Browse files Browse the repository at this point in the history
…sted). This is, in fact, much cleaner than my previous approach. I also placed at the tail of the include directories list so Diligent's headers are prefurred over what's already installed in the system.
  • Loading branch information
LadySerenaKitty committed Feb 2, 2024
1 parent 7ff24a7 commit d41441e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ elseif(PLATFORM_LINUX)
set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Linux platform")
if(PLATFORM_FREEBSD)
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1 PLATFORM_FREEBSD=1)
if(EXISTS /usr/local/include)
include_directories(/usr/local/include)
endif()
else()
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1)
endif()
Expand Down Expand Up @@ -525,6 +522,9 @@ else()
set(DILIGENT_INSTALL_PDB OFF)
endif()

if(PLATFORM_FREEBSD AND EXISTS /usr/local/include)
target_include_directories(Diligent-BuildSettings SYSTEM AFTER INTERFACE /usr/local/include)
endif()
file(RELATIVE_PATH DILIGENT_CORE_DIR "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
SET(DILIGENT_CORE_DIR ${DILIGENT_CORE_DIR} CACHE INTERNAL "Diligent Core installation directory")

Expand Down

0 comments on commit d41441e

Please sign in to comment.