Open aaronfranke opened 2 years ago
Getting things compiling should be relatively easy by detecting apple platform in cmake and then not using the Linux specific flags. Just saying if someone wants to give this a go, as I have currently no need myself to get this working on mac.
You can use -fuse-ld=ld
and drop the two static arguments and it builds fine for me on macOS.
--- 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()
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.