Add FreeBSD support (#939)

* Add FreeBSD support

* Fix indentation

* Fix Linux not finding OpenGL

* Link POSIX Realtime Extensions library

* Link POSIX Realtime Extensions when OpenGL is enabled too

* Fail if shm_open memory exists and also check for errors

* fix the last commit

* (try to) Setup FreeBSD CI

* Fix some issues with FreeBSD CI

* Make with all cores

* Remove FreeBSD CI 

It doesn't want to work for some reason
This commit is contained in:
WaluigiWare64
2021-01-22 18:20:32 +00:00
committed by GitHub
parent 34da7f5cc3
commit 9994d3a644
4 changed files with 32 additions and 27 deletions

View File

@ -106,17 +106,19 @@ if (APPLE)
endif()
if (ENABLE_OGLRENDERER)
if (WIN32)
target_link_libraries(core ole32 comctl32 ws2_32 opengl32)
elseif (APPLE)
target_link_libraries(core "-framework OpenGL")
else()
target_link_libraries(core GL EGL)
endif()
find_package(OpenGL REQUIRED)
if (WIN32)
target_link_libraries(core ole32 comctl32 ws2_32 opengl32)
elseif (APPLE)
target_link_libraries(core ${OPENGL_gl_LIBRARY})
else()
target_include_directories(core PRIVATE ${OPENGL_INCLUDE_DIR} ${OPENGL_EGL_INCLUDE_DIRS})
target_link_libraries(core rt OpenGL::GL ${OPENGL_egl_LIBRARY})
endif()
else()
if (WIN32)
target_link_libraries(core ole32 comctl32 ws2_32)
else()
target_link_libraries(core)
target_link_libraries(core rt)
endif()
endif()