-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add support for macOS #16
Comments
Getting things compiling should be relatively easy by detecting apple platform in cmake and then not using the Linux specific flags. |
You can use --- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -20,7 +20,7 @@ add_executable(godotpcktool main.cpp)
target_link_libraries(godotpcktool PRIVATE pck)
# Static standard lib
-target_link_libraries(godotpcktool PRIVATE -static-libgcc -static-libstdc++)
+target_link_libraries(godotpcktool PRIVATE)
# Fully static executable
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
@@ -28,7 +28,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif()
if(NOT WIN32)
- set_target_properties(godotpcktool PROPERTIES LINK_FLAGS_RELEASE "-s -fuse-ld=gold")
+ set_target_properties(godotpcktool PROPERTIES LINK_FLAGS_RELEASE "-s -fuse-ld=ld")
else()
set_target_properties(godotpcktool PROPERTIES LINK_FLAGS_RELEASE "-s")
endif() |
For anyone on Mac coming later, I was able to compile on macOS Sequoia by following these steps:
This process ended up working for me (after hours of struggling!):
|
When I try to compile GodotPckTool using
make
on macOS, I get this output:I'm not familiar with CMake, so I'm not sure how to add support for macOS. But I would greatly appreciate it, it would be useful to have when trying to debug a Mac build of my Godot project.
The text was updated successfully, but these errors were encountered: