Skip to content

Commit 74350fa

Browse files
authored
[build] CMake: Delete BuildOptions.cmake (raysan5#4277)
This file seems to not do anything useful. From what I can tell the OSX_FATLIB option sets CMAKE_OSX_ARCHITECTURES to "x86_64;i386". This doesn't account for the arm that apple now has, as well as 32 bit support being completely removed, and I think it's entirely reasonable to expect users to pass the necessary architectures they want themselves. It's possible this could break some users who rely on this, but I sincerely doubt anyone does. The solution is trivial either way (put -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" on the command line yourself) The second part of BuildOptions.cmake claims to set PLATFORM to "Web" if the emscripten toolchain file is used (if (EMSCRIPTEN)), but it does not work correctly anyway. Currently, glfw searches for wayland and x11 libraries and fails likeso: CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:645 (message): The following required packages were not found: - wayland-client>=0.2.7 - wayland-cursor>=0.2.7 - wayland-egl>=0.2.7 - xkbcommon>=0.5.0 Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:873 (_pkg_check_modules_internal) src/external/glfw/src/CMakeLists.txt:163 (pkg_check_modules) Considering this code doesn't work as described, it's okay to delete it. I think a better check should be implemented, but that is for a different PR.
1 parent cc88e0b commit 74350fa

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ include(CompilerFlags)
3636
# Registers build options that are exposed to cmake
3737
include(CMakeOptions.txt)
3838

39-
# Enforces a few environment and compiler configurations
40-
include(BuildOptions)
41-
4239
if (UNIX AND NOT APPLE)
4340
if (NOT GLFW_BUILD_WAYLAND AND NOT GLFW_BUILD_X11)
4441
MESSAGE(FATAL_ERROR "Cannot disable both Wayland and X11")

CMakeOptions.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended
1616
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
1717
option(WITH_PIC "Compile static library as position-independent code" OFF)
1818
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
19-
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
2019
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
2120

2221
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")

cmake/BuildOptions.cmake

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)