Comments (10)
Wow, well I'm happy to see that got up and running relatively quickly! I'll leave this open while I fold in the changes you've suggested. Thanks for the help.
from edge-classic.
from edge-classic.
Sweet, thanks for testing. I just pushed the same CMakeLists as 17a48ac and will close this issue then. Let me know if any other Apple issues crop up.
from edge-classic.
I'll have to try to wrangle up a VM for testing this.
Although it's not causing the error in question, SDL 1.x should be the dependency here. Is it asking you to explicitly install the SDL2 library/headers?
In the meantime, does changing line 31 of source_files/epi/epi_macosx.h to this help?:
#ifdef GNUC
#define GCCATTR(xyz) attribute (xyz)
#else
#define GCCATTR(xyz) /* nothing */
#endif
from edge-classic.
Ahh yes, it is SDL 1.2 not SDL2. Sorry, I've spent a lot of time lately with SDL2 source ports.
So you were right about that one addition. I'm working on a few others to get it building. I'll report back once that is done.
EDIT:
So you were right with that fix you mentioned. Below are a few others.
Since your CMake file does not define a MACOSX preprocessor macro, the resulting Makefile does not define MACOSX, and so anything in an ifdef/else with MACOSX will not be triggered. I would suggest to go the least painful route and use 'APPLE' as this will be triggered when running on all Apple systems.
epi.h
#ifdef __APPLE__
#include "epi_macosx.h"
#endif
deh_edge/i_defs.h
// MacOS X
#elif defined (__APPLE__)
edge/i_defs_gl.h
#ifdef __APPLE__
#include <GL/glew.h>
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#endif
edge/unx_system.cc
Remove the MACOSX ifndef. This is no longer true and MacOS needs this function.
//
// I_MessageBox
//
void I_MessageBox(const char *message, const char *title)
{
#ifdef USE_FLTK
Fl::scheme(NULL);
fl_message_font(FL_HELVETICA /*_BOLD*/, 18);
fl_message("%s", message);
#else // USE_FLTK
fprintf(stderr, "\n%s\n", message);
#endif // USE_FLTK
}
Finally (I also renamed all MACOSX macros to APPLE), I also had to manually configure the link.txt file to correctly point to all the right things (CMake should do this when it is properly configured for a MacOS system).
link.txt:
/Library/Developer/CommandLineTools/usr/bin/c++ -O2 -ffast-math -fno-strict-aliasing -DINLINE_G=inline -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/edge135.dir/source_files/edge/i_main.cc.o CMakeFiles/edge135.dir/source_files/edge/i_ctrl.cc.o CMakeFiles/edge135.dir/source_files/edge/i_video.cc.o CMakeFiles/edge135.dir/source_files/edge/i_sound.cc.o CMakeFiles/edge135.dir/source_files/edge/i_net.cc.o CMakeFiles/edge135.dir/source_files/edge/am_map.cc.o CMakeFiles/edge135.dir/source_files/edge/con_con.cc.o CMakeFiles/edge135.dir/source_files/edge/con_main.cc.o CMakeFiles/edge135.dir/source_files/edge/con_link.cc.o CMakeFiles/edge135.dir/source_files/edge/con_var.cc.o CMakeFiles/edge135.dir/source_files/edge/e_input.cc.o CMakeFiles/edge135.dir/source_files/edge/e_main.cc.o CMakeFiles/edge135.dir/source_files/edge/e_player.cc.o CMakeFiles/edge135.dir/source_files/edge/f_finale.cc.o CMakeFiles/edge135.dir/source_files/edge/f_interm.cc.o CMakeFiles/edge135.dir/source_files/edge/g_game.cc.o CMakeFiles/edge135.dir/source_files/edge/hu_draw.cc.o CMakeFiles/edge135.dir/source_files/edge/hu_font.cc.o CMakeFiles/edge135.dir/source_files/edge/hu_stuff.cc.o CMakeFiles/edge135.dir/source_files/edge/hu_style.cc.o CMakeFiles/edge135.dir/source_files/edge/l_glbsp.cc.o CMakeFiles/edge135.dir/source_files/edge/l_deh.cc.o CMakeFiles/edge135.dir/source_files/edge/m_argv.cc.o CMakeFiles/edge135.dir/source_files/edge/m_bbox.cc.o CMakeFiles/edge135.dir/source_files/edge/m_cheat.cc.o CMakeFiles/edge135.dir/source_files/edge/m_math.cc.o CMakeFiles/edge135.dir/source_files/edge/m_menu.cc.o CMakeFiles/edge135.dir/source_files/edge/m_misc.cc.o CMakeFiles/edge135.dir/source_files/edge/m_option.cc.o CMakeFiles/edge135.dir/source_files/edge/m_netgame.cc.o CMakeFiles/edge135.dir/source_files/edge/m_random.cc.o CMakeFiles/edge135.dir/source_files/edge/n_bcast.cc.o CMakeFiles/edge135.dir/source_files/edge/n_reliable.cc.o CMakeFiles/edge135.dir/source_files/edge/n_network.cc.o CMakeFiles/edge135.dir/source_files/edge/p_action.cc.o CMakeFiles/edge135.dir/source_files/edge/p_blockmap.cc.o CMakeFiles/edge135.dir/source_files/edge/p_bot.cc.o CMakeFiles/edge135.dir/source_files/edge/p_enemy.cc.o CMakeFiles/edge135.dir/source_files/edge/p_inter.cc.o CMakeFiles/edge135.dir/source_files/edge/p_lights.cc.o CMakeFiles/edge135.dir/source_files/edge/p_map.cc.o CMakeFiles/edge135.dir/source_files/edge/p_maputl.cc.o CMakeFiles/edge135.dir/source_files/edge/p_mobj.cc.o CMakeFiles/edge135.dir/source_files/edge/p_plane.cc.o CMakeFiles/edge135.dir/source_files/edge/p_setup.cc.o CMakeFiles/edge135.dir/source_files/edge/p_sight.cc.o CMakeFiles/edge135.dir/source_files/edge/p_spec.cc.o CMakeFiles/edge135.dir/source_files/edge/p_switch.cc.o CMakeFiles/edge135.dir/source_files/edge/p_tick.cc.o CMakeFiles/edge135.dir/source_files/edge/p_user.cc.o CMakeFiles/edge135.dir/source_files/edge/p_forces.cc.o CMakeFiles/edge135.dir/source_files/edge/p_telept.cc.o CMakeFiles/edge135.dir/source_files/edge/p_weapon.cc.o CMakeFiles/edge135.dir/source_files/edge/rad_act.cc.o CMakeFiles/edge135.dir/source_files/edge/rad_pars.cc.o CMakeFiles/edge135.dir/source_files/edge/rad_trig.cc.o CMakeFiles/edge135.dir/source_files/edge/r_draw.cc.o CMakeFiles/edge135.dir/source_files/edge/r_shader.cc.o CMakeFiles/edge135.dir/source_files/edge/r_render.cc.o CMakeFiles/edge135.dir/source_files/edge/r_effects.cc.o CMakeFiles/edge135.dir/source_files/edge/r_main.cc.o CMakeFiles/edge135.dir/source_files/edge/r_occlude.cc.o CMakeFiles/edge135.dir/source_files/edge/m_logo.cc.o CMakeFiles/edge135.dir/source_files/edge/r_things.cc.o CMakeFiles/edge135.dir/source_files/edge/r_units.cc.o CMakeFiles/edge135.dir/source_files/edge/r_wipe.cc.o CMakeFiles/edge135.dir/source_files/edge/r_misc.cc.o CMakeFiles/edge135.dir/source_files/edge/r_sky.cc.o CMakeFiles/edge135.dir/source_files/edge/r_colormap.cc.o CMakeFiles/edge135.dir/source_files/edge/r_modes.cc.o CMakeFiles/edge135.dir/source_files/edge/r_md2.cc.o CMakeFiles/edge135.dir/source_files/edge/r_image.cc.o CMakeFiles/edge135.dir/source_files/edge/r_doomtex.cc.o CMakeFiles/edge135.dir/source_files/edge/r_texgl.cc.o CMakeFiles/edge135.dir/source_files/edge/s_blit.cc.o CMakeFiles/edge135.dir/source_files/edge/s_cache.cc.o CMakeFiles/edge135.dir/source_files/edge/s_sound.cc.o CMakeFiles/edge135.dir/source_files/edge/s_mp3.cc.o CMakeFiles/edge135.dir/source_files/edge/s_music.cc.o CMakeFiles/edge135.dir/source_files/edge/s_ogg.cc.o CMakeFiles/edge135.dir/source_files/edge/s_tsf.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_chunk.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_glob.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_level.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_load.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_main.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_misc.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_mobj.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_play.cc.o CMakeFiles/edge135.dir/source_files/edge/sv_save.cc.o CMakeFiles/edge135.dir/source_files/edge/w_flat.cc.o CMakeFiles/edge135.dir/source_files/edge/w_model.cc.o CMakeFiles/edge135.dir/source_files/edge/w_sprite.cc.o CMakeFiles/edge135.dir/source_files/edge/w_texture.cc.o CMakeFiles/edge135.dir/source_files/edge/w_wad.cc.o CMakeFiles/edge135.dir/source_files/edge/z_zone.cc.o CMakeFiles/edge135.dir/source_files/edge/vm_coal.cc.o CMakeFiles/edge135.dir/source_files/edge/vm_hud.cc.o CMakeFiles/edge135.dir/source_files/edge/vm_player.cc.o CMakeFiles/edge135.dir/source_files/edge/unx_music.cc.o CMakeFiles/edge135.dir/source_files/edge/unx_net.cc.o CMakeFiles/edge135.dir/source_files/edge/unx_system.cc.o -o edge135 source_files/coal/libedge_coal.a source_files/ddf/libedge_ddf.a source_files/deh_edge/libedge_deh.a source_files/epi/libedge_epi.a source_files/glbsp/libedge_glbsp.a -framework OpenGL /usr/local/lib/libGLEW.dylib /usr/local/Cellar/sdl/1.2.15_3/lib/libSDLmain.a /usr/local/Cellar/sdl/1.2.15_3/lib/libSDL.dylib -framework Foundation -framework Cocoa source_files/libpng/libpng16.a source_files/libjpeg/libjpeg.a source_files/zlib/libz.a
After all this, it links without issues and it is playable. Phew.. as always, I'll be more than happy to test any CMake additions for Mac systems that you may do.
from edge-classic.
6728121 should have the changes you've mentioned above...were those enough for link.txt to be fixed when starting fresh, or were there further adjustments needed?
from edge-classic.
I had an issue with OpenGL and SDL linking. I used the below in the unix target_link_libraries part:
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${SDL_LIBRARIES}
Then it linked without issues. Compilation went through without a hitch.
from edge-classic.
I wonder if that's related to me trying to make non-Window builds link with the bundled glew folder instead...would you be able to attach your CMakeLists.txt?
from edge-classic.
Would you mind giving this one a spin? If it doesn't work, I may need to add a find_package(GLEW) for Apple targets
from edge-classic.
Perfect! Works fine with your latest master.
from edge-classic.
Related Issues (20)
- Drag-and-drop does not check to see if the file being dragged and dropped is an IWAD HOT 1
- SKULLFLY attack type triggers player pain effects even if it does not inflict any damage HOT 1
- Update Pack File searches to be "root" aware HOT 1
- Nightmare/Fast Mode state durations are not reduced when appropriate HOT 1
- "Reset to Defaults" does not reset smoothed/upscaled images HOT 1
- Sandbox the Lua VM's by not including certain libs
- Add support for MUSINFO changer things HOT 3
- Overlay HUD: Wrong armour colours HOT 1
- UDMF: Ensure ad-hoc thing/sector types are preserved over save games HOT 1
- PLAYPAL/Palettes later in the load order are not being applied when using the TEXTURE image type HOT 1
- Load order and LUAHUDS HOT 1
- Doom 1: Intermission screen scaling does not take into account misc graphics HOT 1
- Eureka: Fatal Error HOT 5
- Optimize UDMF parsing HOT 1
- Use stdint.h types instead of custom typedefs from cstdint.h HOT 1
- Folder creation permissions issue on Linux HOT 1
- Multiple iWADs break the launcher under Linux HOT 3
- Feature Request: Automatically load last quicksave HOT 1
- Add icon.png to repository root HOT 1
- Suggestion: Clone the COMPILING.md on the wiki HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edge-classic.