From d41441e2058aae3c2d9f2cb75ea83473ada50be6 Mon Sep 17 00:00:00 2001 From: Jessica Hawkwell Date: Fri, 2 Feb 2024 11:35:29 -0600 Subject: [PATCH] Placing FreeBSD-specific stuffs into Diligent-BuildSettings (as requested). 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. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b7ecb03c9..a348dde61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() @@ -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")