Add QuartzCore when building for macOS to other build files
This commit is contained in:
parent
03dbcad5ba
commit
b463903533
10 changed files with 12 additions and 7 deletions
|
|
@ -139,6 +139,7 @@ pub fn linkMacOS(b: *std.Build, mod: *std.Build.Module) void {
|
||||||
mod.linkFramework("CoreGraphics", .{});
|
mod.linkFramework("CoreGraphics", .{});
|
||||||
mod.linkFramework("AppKit", .{});
|
mod.linkFramework("AppKit", .{});
|
||||||
mod.linkFramework("IOKit", .{});
|
mod.linkFramework("IOKit", .{});
|
||||||
|
mod.linkFramework("QuartzCore", .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
|
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,7 @@ foreach (example_source ${example_sources})
|
||||||
target_link_libraries(${example_name} "-framework IOKit")
|
target_link_libraries(${example_name} "-framework IOKit")
|
||||||
target_link_libraries(${example_name} "-framework Cocoa")
|
target_link_libraries(${example_name} "-framework Cocoa")
|
||||||
target_link_libraries(${example_name} "-framework OpenGL")
|
target_link_libraries(${example_name} "-framework OpenGL")
|
||||||
|
target_link_libraries(${example_name} "-framework QuartzCore")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif (${PLATFORM} MATCHES "RGFW")
|
elseif (${PLATFORM} MATCHES "RGFW")
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
*
|
*
|
||||||
* APPLE COMPILATION:
|
* APPLE COMPILATION:
|
||||||
* gcc -o rlgl_standalone rlgl_standalone.c -I../../src -Iexternal/include -Lexternal/lib \
|
* gcc -o rlgl_standalone rlgl_standalone.c -I../../src -Iexternal/include -Lexternal/lib \
|
||||||
* -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa
|
* -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa -framework QuartzCore
|
||||||
* -Wno-deprecated-declarations -std=c99 -DGRAPHICS_API_OPENGL_33
|
* -Wno-deprecated-declarations -std=c99 -DGRAPHICS_API_OPENGL_33
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -38,4 +38,5 @@ if (APPLE)
|
||||||
target_link_libraries(${PROJECT_NAME} "-framework IOKit")
|
target_link_libraries(${PROJECT_NAME} "-framework IOKit")
|
||||||
target_link_libraries(${PROJECT_NAME} "-framework Cocoa")
|
target_link_libraries(${PROJECT_NAME} "-framework Cocoa")
|
||||||
target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
|
target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
|
||||||
|
target_link_libraries(${PROJECT_NAME} "-framework QuartzCore")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
<Add option="-framework IOKit" />
|
<Add option="-framework IOKit" />
|
||||||
<Add option="-framework CoreAudio" />
|
<Add option="-framework CoreAudio" />
|
||||||
<Add option="-framework CoreVideo" />
|
<Add option="-framework CoreVideo" />
|
||||||
|
<Add option="-framework QuartzCore" />
|
||||||
</Linker>
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
<Target title="Release (Mac)">
|
<Target title="Release (Mac)">
|
||||||
|
|
@ -44,6 +45,7 @@
|
||||||
<Add option="-framework IOKit" />
|
<Add option="-framework IOKit" />
|
||||||
<Add option="-framework CoreAudio" />
|
<Add option="-framework CoreAudio" />
|
||||||
<Add option="-framework CoreVideo" />
|
<Add option="-framework CoreVideo" />
|
||||||
|
<Add option="-framework QuartzCore" />
|
||||||
</Linker>
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
<Target title="Debug (Linux)">
|
<Target title="Debug (Linux)">
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework OpenAL -framework Cocoa -framework IOKit
|
LDLIBS = -lraylib -framework OpenGL -framework OpenAL -framework Cocoa -framework IOKit -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,13 @@ OUTPUT_DIR="builds/osx"
|
||||||
COMPILATION_FLAGS="-std=c99 -O2 -flto"
|
COMPILATION_FLAGS="-std=c99 -O2 -flto"
|
||||||
FINAL_COMPILE_FLAGS="-s"
|
FINAL_COMPILE_FLAGS="-s"
|
||||||
WARNING_FLAGS="-Wall -Wextra -Wpedantic"
|
WARNING_FLAGS="-Wall -Wextra -Wpedantic"
|
||||||
LINK_FLAGS="-flto -framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa"
|
LINK_FLAGS="-flto -framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa -framework QuartzCore"
|
||||||
# Debug changes to flags
|
# Debug changes to flags
|
||||||
if [ -n "$BUILD_DEBUG" ]; then
|
if [ -n "$BUILD_DEBUG" ]; then
|
||||||
OUTPUT_DIR="builds-debug/osx"
|
OUTPUT_DIR="builds-debug/osx"
|
||||||
COMPILATION_FLAGS="-std=c99 -O0 -g"
|
COMPILATION_FLAGS="-std=c99 -O0 -g"
|
||||||
FINAL_COMPILE_FLAGS=""
|
FINAL_COMPILE_FLAGS=""
|
||||||
LINK_FLAGS="-framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa"
|
LINK_FLAGS="-framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa -framework QuartzCore"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Display what we're doing
|
# Display what we're doing
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue