Skip to content

Commit

Permalink
Merge pull request jjuhl#4 from laudrup/fix-win32-build
Browse files Browse the repository at this point in the history
Fix win32 build
  • Loading branch information
jjuhl committed Aug 12, 2011
2 parents 495f645 + 1a2d127 commit 1faeaba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Expand Up @@ -41,6 +41,11 @@ set(SOURCES
effects.cc
)

if(WIN32 AND NOT UNIX)
# We do not care about Microsofts secure implementations of standard library functions
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(WIN32 AND NOT UNIX)

# Create etags for emacs
add_custom_target(etags
COMMAND ${ETAGS} --declarations --ignore-indentation ${CMAKE_SOURCE_DIR}/*
Expand All @@ -58,3 +63,7 @@ add_executable(
WIN32 # Avoid DOS prompt to appear in Windows
${SOURCES}
)

mark_as_advanced(
ETAGS
)
2 changes: 1 addition & 1 deletion main.cc
Expand Up @@ -15,7 +15,7 @@ int main(int argc, char** argv)
{
Options my_options(argc, argv);

Uint32 sdl_flags = SDL_INIT_TIMER|SDL_INIT_VIDEO|SDL_INIT_EVENTTHREAD;
Uint32 sdl_flags = SDL_INIT_TIMER|SDL_INIT_VIDEO;
if (!my_options.hasOption("nosound"))
sdl_flags |= SDL_INIT_AUDIO;
int err = SDL_Init(sdl_flags);
Expand Down
2 changes: 1 addition & 1 deletion textwriter.cc
Expand Up @@ -94,5 +94,5 @@ bool TextWriter::render(SDL_Surface* dest, SDL_Rect* dst, const std::string& tex
int err = SDL_BlitSurface(text_surf, 0, dest, dst);
SDL_FreeSurface(text_surf);

return err;
return !!err;
}

0 comments on commit 1faeaba

Please sign in to comment.