2.8 branch: Fixes for mingw build. Merges 10963 and 10965 from trunk.

This commit is contained in:
Paul MARTZ
2010-03-30 15:23:18 +00:00
parent 1712176900
commit ae233b9392
5 changed files with 44 additions and 18 deletions

View File

@@ -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)

View File

@@ -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*

View File

@@ -8,6 +8,7 @@
#include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include "TileMapper.h"
#include "TXPNode.h"