2010-01-18 22:27:20 +08:00
|
|
|
SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
|
|
|
|
|
2007-03-29 17:29:26 +08:00
|
|
|
IF("${SDL_LIBRARY}" MATCHES "SDLmain")
|
|
|
|
# Found a precompiled SDLmain library.
|
2007-06-02 06:41:11 +08:00
|
|
|
SET(TARGET_SRC osgviewerSDL.cpp)
|
2010-01-18 22:27:20 +08:00
|
|
|
ELSE()
|
2007-03-29 17:29:26 +08:00
|
|
|
# No SDLmain has been found.
|
|
|
|
# Depending on platform, code may need to be provided for SDLmain.
|
|
|
|
IF(APPLE)
|
2007-06-02 06:41:11 +08:00
|
|
|
SET(TARGET_SRC osgviewerSDL.cpp SDLMainForMacOSX.m SDLMainForMacOSX.h)
|
2010-01-18 22:27:20 +08:00
|
|
|
ELSE()
|
2007-03-29 17:29:26 +08:00
|
|
|
# Unhandled case. No libsdlmain has been found and no code substitute.
|
|
|
|
# Depending on platform (or SDL version),
|
|
|
|
# this may or may not link successfully.
|
2007-06-02 06:41:11 +08:00
|
|
|
SET(TARGET_SRC osgviewerSDL.cpp)
|
2010-01-18 22:27:20 +08:00
|
|
|
SET(TARGET_EXTERNAL_LIBRARIES ${SDLMAIN_LIBRARY} ${TARGET_EXTERNAL_LIBRARIES} )
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
2007-03-26 17:48:02 +08:00
|
|
|
|
2010-01-18 22:27:20 +08:00
|
|
|
IF (MINGW)
|
|
|
|
SET(TARGET_EXTERNAL_LIBRARIES mingw32 ${TARGET_EXTERNAL_LIBRARIES} winmm dinput ddraw dxguid)
|
|
|
|
ENDIF()
|
2007-03-22 22:06:27 +08:00
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} )
|
|
|
|
|
|
|
|
#### end var setup ###
|
2007-06-02 06:41:11 +08:00
|
|
|
SETUP_EXAMPLE(osgviewerSDL)
|
2007-03-29 17:29:26 +08:00
|
|
|
|