2.8 branch: Fixes for mingw build. Merges 10963 and 10965 from trunk.
This commit is contained in:
@@ -162,9 +162,21 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
||||
ADD_SUBDIRECTORY(osgviewerWX)
|
||||
ENDIF(wxWidgets_FOUND)
|
||||
|
||||
IF (QT_FOUND AND QT_QTOPENGL_LIBRARY)
|
||||
ADD_SUBDIRECTORY(osgviewerQT)
|
||||
ENDIF(QT_FOUND AND QT_QTOPENGL_LIBRARY)
|
||||
IF (QT_FOUND)
|
||||
OPTION(BUILD_QT_EXAMPLES "Enable the build of the examples that depend on Qt" ON)
|
||||
|
||||
IF (BUILD_QT_EXAMPLES AND QT_QTOPENGL_LIBRARY)
|
||||
ADD_SUBDIRECTORY(osgviewerQT)
|
||||
ENDIF()
|
||||
|
||||
IF (BUILD_QT_EXAMPLES AND QT4_FOUND)
|
||||
ADD_SUBDIRECTORY(osgviewerQtWidget)
|
||||
|
||||
IF (QT_QTWEBKIT_FOUND)
|
||||
ADD_SUBDIRECTORY(osgQtBrowser)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (FLTK_FOUND)
|
||||
ADD_SUBDIRECTORY(osgviewerFLTK)
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
|
||||
|
||||
IF("${SDL_LIBRARY}" MATCHES "SDLmain")
|
||||
# Found a precompiled SDLmain library.
|
||||
SET(TARGET_SRC osgviewerSDL.cpp)
|
||||
ELSE("${SDL_LIBRARY}" MATCHES "SDLmain")
|
||||
ELSE()
|
||||
# No SDLmain has been found.
|
||||
# Depending on platform, code may need to be provided for SDLmain.
|
||||
IF(APPLE)
|
||||
SET(TARGET_SRC osgviewerSDL.cpp SDLMainForMacOSX.m SDLMainForMacOSX.h)
|
||||
ELSE(APPLE)
|
||||
ELSE()
|
||||
# Unhandled case. No libsdlmain has been found and no code substitute.
|
||||
# Depending on platform (or SDL version),
|
||||
# this may or may not link successfully.
|
||||
SET(TARGET_SRC osgviewerSDL.cpp)
|
||||
ENDIF(APPLE)
|
||||
ENDIF("${SDL_LIBRARY}" MATCHES "SDLmain")
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${SDLMAIN_LIBRARY} ${TARGET_EXTERNAL_LIBRARIES} )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
|
||||
IF (MINGW)
|
||||
SET(TARGET_EXTERNAL_LIBRARIES mingw32 ${TARGET_EXTERNAL_LIBRARIES} winmm dinput ddraw dxguid)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} )
|
||||
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
#this file is automatically generated
|
||||
|
||||
OPTION(CURL_IS_STATIC "on if curl is a static lib " ON)
|
||||
MARK_AS_ADVANCED(CURL_IS_STATIC)
|
||||
|
||||
IF(WIN32)
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT")
|
||||
IF(CURL_IS_STATIC)
|
||||
ADD_DEFINITIONS(-DCURL_STATICLIB)
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ws2_32 winmm wldap32)
|
||||
ENDIF(CURL_IS_STATIC)
|
||||
ENDIF(WIN32)
|
||||
ENDIF()
|
||||
|
||||
IF(ZLIB_FOUND)
|
||||
ADD_DEFINITIONS(-DUSE_ZLIB)
|
||||
@@ -19,7 +13,7 @@ ELSE(ZLIB_FOUND)
|
||||
ENDIF(ZLIB_FOUND)
|
||||
|
||||
|
||||
SET(TARGET_SRC
|
||||
SET(TARGET_SRC
|
||||
ReaderWriterCURL.cpp
|
||||
)
|
||||
|
||||
@@ -28,11 +22,17 @@ SET(TARGET_H
|
||||
)
|
||||
|
||||
IF(ZLIB_FOUND)
|
||||
SET(TARGET_LIBRARIES_VARS CURL_LIBRARY ZLIB_LIBRARY)
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${CURL_LIBRARY} ${ZLIB_LIBRARY})
|
||||
ELSE(ZLIB_FOUND)
|
||||
SET(TARGET_LIBRARIES_VARS CURL_LIBRARY )
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${CURL_LIBRARY})
|
||||
ENDIF(ZLIB_FOUND)
|
||||
|
||||
IF(WIN32 OR MINGW)
|
||||
IF(CURL_IS_STATIC)
|
||||
ADD_DEFINITIONS(-DCURL_STATICLIB)
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
#### end var setup ###
|
||||
SETUP_PLUGIN(curl)
|
||||
|
||||
@@ -70,6 +70,14 @@ namespace osgDBJPEG
|
||||
|
||||
static int jpegerror = ERR_NO_ERROR;
|
||||
|
||||
/* Some versions of jmorecfg.h define boolean, some don't...
|
||||
Those that do also define HAVE_BOOLEAN, so we can guard using that. */
|
||||
#ifndef HAVE_BOOLEAN
|
||||
typedef int boolean;
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
/* CODE FOR READING/WRITING JPEG FROM STREAMS
|
||||
* This code was taken directly from jdatasrc.c and jdatadst.c (libjpeg source)
|
||||
* and modified to use a std::istream/ostream* instead of a FILE*
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "TileMapper.h"
|
||||
#include "TXPNode.h"
|
||||
|
||||
Reference in New Issue
Block a user