fix linux compile and increase version
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_policy(VERSION 2.6)
|
||||
if(POLICY CMP0063)
|
||||
cmake_policy(SET CMP0063 OLD)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
project(TinyEXIF)
|
||||
include(GNUInstallDirs)
|
||||
@@ -14,12 +10,13 @@ find_package(tinyxml2 REQUIRED)
|
||||
################################
|
||||
# set lib version here
|
||||
|
||||
set(GENERIC_LIB_VERSION "1.0.0")
|
||||
set(GENERIC_LIB_VERSION "1.0.1")
|
||||
set(GENERIC_LIB_SOVERSION "1")
|
||||
|
||||
################################
|
||||
# Add definitions
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||
|
||||
################################
|
||||
|
||||
@@ -703,7 +703,7 @@ int EXIFInfo::parseFrom(EXIFStream& stream) {
|
||||
int EXIFInfo::parseFrom(const uint8_t* buf, unsigned len) {
|
||||
class EXIFStreamBuffer : public EXIFStream {
|
||||
public:
|
||||
EXIFStreamBuffer(const uint8_t* buf, unsigned len)
|
||||
explicit EXIFStreamBuffer(const uint8_t* buf, unsigned len)
|
||||
: it(buf), end(buf+len) {}
|
||||
bool IsValid() const override {
|
||||
return it != NULL;
|
||||
@@ -722,7 +722,8 @@ int EXIFInfo::parseFrom(const uint8_t* buf, unsigned len) {
|
||||
private:
|
||||
const uint8_t* it, * const end;
|
||||
};
|
||||
return parseFrom(EXIFStreamBuffer(buf, len));
|
||||
EXIFStreamBuffer stream(buf, len);
|
||||
return parseFrom(stream);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#define TINYEXIF_MAJOR_VERSION 1
|
||||
#define TINYEXIF_MINOR_VERSION 0
|
||||
#define TINYEXIF_PATCH_VERSION 0
|
||||
#define TINYEXIF_PATCH_VERSION 1
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# ifdef TINYEXIF_EXPORT
|
||||
|
||||
Reference in New Issue
Block a user