-
Notifications
You must be signed in to change notification settings - Fork 155
Adding FreeBSD build support. #460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,6 +125,10 @@ else() | |
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | ||
set(PLATFORM_LINUX TRUE CACHE INTERNAL "Target platform: Linux") | ||
message("Target platform: Linux " ${ARCH}) | ||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") | ||
set(PLATFORM_LINUX TRUE CACHE INTERNAL "Target platform: Linux") | ||
set(PLATFORM_FREEBSD TRUE CACHE INTERNAL "Target platform: FreeBSD") | ||
LadySerenaKitty marked this conversation as resolved.
Show resolved
Hide resolved
|
||
message("Target platform: FreeBSD " ${ARCH}) | ||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | ||
if(IOS) | ||
set(PLATFORM_IOS TRUE CACHE INTERNAL "Target platform: iOS") | ||
|
@@ -197,7 +201,11 @@ elseif(PLATFORM_LINUX) | |
set(GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on Linux platform") | ||
set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is supported on Linux platform") | ||
set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Linux platform") | ||
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1) | ||
if(PLATFORM_FREEBSD) | ||
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1 PLATFORM_FREEBSD=1) | ||
else() | ||
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_LINUX=1) | ||
endif() | ||
elseif(PLATFORM_MACOS) | ||
set(GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on MacOS platform") | ||
set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is enabled through MoltenVK on MacOS platform") | ||
|
@@ -514,6 +522,10 @@ 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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to find some info about this problem, and I think that the right way to fix this is to set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you try setting the |
||
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") | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,7 +286,9 @@ | |
#define __stdcall | ||
#define __vectorcall | ||
#define __thiscall | ||
#ifndef PLATFORM_FREEBSD | ||
#define __fastcall | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On this one, the compiler was complaining about fastcall being redefined, as FreeBSD's headers already define fastcall. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which compiler are you using? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is actually strange why it only complains about Can you post the error that the compiler produces? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is what happens without skipping
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated DXC headers, so this should work now - please try the latest version There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A better way to fix this is to check
Though I do really not understand why it only complains about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I suggested is to use the |
||
#endif | ||
#define __clrcall | ||
#endif // __GNUC__ | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.