mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-28 14:42:23 +00:00
* fix build on OS X via CMake
This commit is contained in:
parent
57324f6fd8
commit
28fd035b22
4 changed files with 26 additions and 3 deletions
|
@ -371,6 +371,20 @@ if( NOT NO_ASM )
|
|||
ENDMACRO( ADD_ASM_FILE )
|
||||
endif( NOT NO_ASM )
|
||||
|
||||
# OpenGL on OS X: Search for GLEW include files
|
||||
|
||||
if( APPLE )
|
||||
find_path( GLEW_INCLUDE_DIR GL/glew.h
|
||||
PATHS "/usr/include"
|
||||
"/usr/local/include" )
|
||||
|
||||
if( GLEW_INCLUDE_DIR )
|
||||
message( STATUS "GLEW include files found at ${GLEW_INCLUDE_DIR}" )
|
||||
else( GLEW_INCLUDE_DIR )
|
||||
message( SEND_ERROR "Could not find GLEW include files" )
|
||||
endif( GLEW_INCLUDE_DIR )
|
||||
endif( APPLE )
|
||||
|
||||
# Decide on SSE setup
|
||||
|
||||
set( SSE_MATTERS NO )
|
||||
|
@ -522,6 +536,12 @@ if( FLUIDSYNTH_FOUND )
|
|||
endif( NOT DYN_FLUIDSYNTH )
|
||||
endif( FLUIDSYNTH_FOUND )
|
||||
|
||||
# OpenGL on OS X: GLEW include directory
|
||||
|
||||
if( APPLE )
|
||||
include_directories( "${GLEW_INCLUDE_DIR}" )
|
||||
endif( APPLE )
|
||||
|
||||
# Start defining source files for ZDoom
|
||||
|
||||
if( WIN32 )
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#if defined(__APPLE__)
|
||||
#define APIENTRY
|
||||
#define APIENTRYP *
|
||||
#endif // __APPLE__
|
||||
|
||||
#include "basictypes.h"
|
||||
|
|
|
@ -156,14 +156,14 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
|||
cancelled = false;
|
||||
|
||||
app = [NSApplication sharedApplication];
|
||||
id windowTitle = [NSString stringWithUTF8String:GAMESIG " " DOTVERSIONSTR ": Select an IWAD to use"];
|
||||
id windowTitle = [NSString stringWithFormat:@"%s %s", GAMESIG, GetVersionString()];
|
||||
|
||||
NSRect frame = NSMakeRect(0, 0, 440, 450);
|
||||
window = [[NSWindow alloc] initWithContentRect:frame styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO];
|
||||
[window setTitle:windowTitle];
|
||||
|
||||
NSTextField *description = [[NSTextField alloc] initWithFrame:NSMakeRect(22, 379, 412, 50)];
|
||||
[self makeLabel:description:"ZDoom found more than one IWAD\nSelect from the list below to determine which one to use:"];
|
||||
[self makeLabel:description:"GZDoom found more than one IWAD\nSelect from the list below to determine which one to use:"];
|
||||
[[window contentView] addSubview:description];
|
||||
[description release];
|
||||
|
||||
|
|
|
@ -321,7 +321,9 @@ SDLGLFB::SDLGLFB (void *, int width, int height, int, int, bool fullscreen)
|
|||
|
||||
#if defined(__APPLE__)
|
||||
// Need to set title here because a window is not created yet when calling the same function from main()
|
||||
SDL_WM_SetCaption( GAMESIG " " DOTVERSIONSTR " (" __DATE__ ")", NULL );
|
||||
char caption[100];
|
||||
mysnprintf(caption, countof(caption), GAMESIG " %s (%s)", GetVersionString(), GetGitTime());
|
||||
SDL_WM_SetCaption(caption, NULL);
|
||||
#endif // __APPLE__
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue