root/OpenSceneGraph/trunk/examples/osgviewerSDL/CMakeLists.txt @ 10963

Revision 10963, 1.0 kB (checked in by robert, 3 years ago)

From Jean-Sebastien Guay, build fixes for Mingw

  • Property svn:eol-style set to native
Line 
1SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
2
3IF("${SDL_LIBRARY}" MATCHES "SDLmain")
4       # Found a precompiled SDLmain library.
5       SET(TARGET_SRC osgviewerSDL.cpp)
6ELSE()
7       # No SDLmain has been found.
8       # Depending on platform, code may need to be provided for SDLmain.
9       IF(APPLE)
10               SET(TARGET_SRC osgviewerSDL.cpp SDLMainForMacOSX.m SDLMainForMacOSX.h)
11       ELSE()
12               # Unhandled case. No libsdlmain has been found and no code substitute.
13               # Depending on platform (or SDL version),
14               # this may or may not link successfully.
15               SET(TARGET_SRC osgviewerSDL.cpp)
16               SET(TARGET_EXTERNAL_LIBRARIES ${SDLMAIN_LIBRARY} ${TARGET_EXTERNAL_LIBRARIES} )
17       ENDIF()
18ENDIF()
19
20IF (MINGW)
21    SET(TARGET_EXTERNAL_LIBRARIES mingw32 ${TARGET_EXTERNAL_LIBRARIES} winmm dinput ddraw dxguid)
22ENDIF()
23
24INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} )
25
26#### end var setup  ###
27SETUP_EXAMPLE(osgviewerSDL)
28
Note: See TracBrowser for help on using the browser.