Skip to content

Commit

Permalink
Merge pull request #32 from laanwj/use-sdl2main
Browse files Browse the repository at this point in the history
Use SDL2main, try to fix windows build
  • Loading branch information
laanwj authored Nov 20, 2023
2 parents 968f486 + 13f034d commit 496c4ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ project('sundog', 'c', 'cpp',
default_options: ['default_library=static', 'c_std=c99', 'cpp_std=c++11', 'warning_level=2'])

sdl2_dep = dependency('SDL2')
sdl2main_dep = dependency('SDL2main', required: false)
m_lib = meson.get_compiler('c').find_library('m', required: false)

# Flip p-system endian (XXX should only be required on little-endian systems)
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sundog_sources = files(
executable('sundog', [sundog_sources, gen_resource],
link_with: [libpsys, libgame, libdebugui],
win_subsystem: 'windows',
dependencies: [libglxw_idep, sdl2_dep, m_lib])
dependencies: [libglxw_idep, sdl2_dep, sdl2main_dep, m_lib])

# Don't build the tools for windows.
# There may be some Linux specific funniness in there, and I don't particularly
Expand Down
1 change: 1 addition & 0 deletions src/sundog.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "swoosh.h"

#include <SDL.h>
#include <SDL_main.h>

#include <stdio.h>
#include <string.h>
Expand Down

0 comments on commit 496c4ef

Please sign in to comment.