Force LF line endings for patch files

This commit is contained in:
Martin Müller 2017-05-05 11:42:36 +02:00
parent 63c613f1ed
commit 1c70d26ad1
9 changed files with 213 additions and 212 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.patch text eol=lf

View File

@ -1,36 +1,36 @@
diff --git a/runtime/antlr4cpp-vs2015.vcxproj b/runtime/antlr4cpp-vs2015.vcxproj
index 85fa3da..540f031 100644
--- a/runtime/antlr4cpp-vs2015.vcxproj
+++ b/runtime/antlr4cpp-vs2015.vcxproj
@@ -201,6 +201,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -239,6 +240,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -281,6 +283,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -325,6 +328,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
diff --git a/runtime/antlr4cpp-vs2015.vcxproj b/runtime/antlr4cpp-vs2015.vcxproj
index 85fa3da..540f031 100644
--- a/runtime/antlr4cpp-vs2015.vcxproj
+++ b/runtime/antlr4cpp-vs2015.vcxproj
@@ -201,6 +201,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -239,6 +240,7 @@
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -281,6 +283,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -325,6 +328,7 @@
</ForcedIncludeFiles>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -1,13 +1,13 @@
diff --git a/bzlib.h b/bzlib.h
index e3ba1d6..d3bed44 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -26,6 +26,8 @@
extern "C" {
#endif
+#define BZ_IMPORT
+
#define BZ_RUN 0
#define BZ_FLUSH 1
#define BZ_FINISH 2
diff --git a/bzlib.h b/bzlib.h
index e3ba1d6..d3bed44 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -26,6 +26,8 @@
extern "C" {
#endif
+#define BZ_IMPORT
+
#define BZ_RUN 0
#define BZ_FLUSH 1
#define BZ_FINISH 2

View File

@ -1,40 +1,40 @@
diff --git a/bzlib.h b/bzlib.h
index 8277123..84fbd0a 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -65,29 +65,23 @@ typedef
}
bz_stream;
-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
#ifndef BZ_NO_STDIO
/* Need a definitition for FILE */
#include <stdio.h>
#endif
#ifdef _WIN32
-# include <windows.h>
# ifdef small
/* windows.h define small to char */
# undef small
# endif
-# ifdef BZ_EXPORT
-# define BZ_API(func) WINAPI func
-# define BZ_EXTERN extern
+# define BZ_API(func) func
+# if defined(BZ_BUILD_DLL)
+# define BZ_EXTERN __declspec(dllexport)
+# elif defined(BZ_IMPORT)
+# define BZ_EXTERN __declspec(dllimport)
# else
- /* import windows dll dynamically */
-# define BZ_API(func) (WINAPI * func)
-# define BZ_EXTERN
+# define BZ_EXTERN
# endif
#else
# define BZ_API(func) func
diff --git a/bzlib.h b/bzlib.h
index 8277123..84fbd0a 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -65,29 +65,23 @@ typedef
}
bz_stream;
-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
#ifndef BZ_NO_STDIO
/* Need a definitition for FILE */
#include <stdio.h>
#endif
#ifdef _WIN32
-# include <windows.h>
# ifdef small
/* windows.h define small to char */
# undef small
# endif
-# ifdef BZ_EXPORT
-# define BZ_API(func) WINAPI func
-# define BZ_EXTERN extern
+# define BZ_API(func) func
+# if defined(BZ_BUILD_DLL)
+# define BZ_EXTERN __declspec(dllexport)
+# elif defined(BZ_IMPORT)
+# define BZ_EXTERN __declspec(dllimport)
# else
- /* import windows dll dynamically */
-# define BZ_API(func) (WINAPI * func)
-# define BZ_EXTERN
+# define BZ_EXTERN
# endif
#else
# define BZ_API(func) func

View File

@ -1,14 +1,14 @@
diff --git a/lzma.h b/lzma.h
index ce675a7..ac0fc98 100644
--- a/lzma.h
+++ b/lzma.h
@@ -187,6 +187,9 @@
* need to worry about LZMA_API_STATIC. Also the calling convention is
* omitted on Cygwin but not on MinGW.
*/
+
+#define LZMA_API_STATIC
+
#ifndef LZMA_API_IMPORT
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
# define LZMA_API_IMPORT __declspec(dllimport)
diff --git a/lzma.h b/lzma.h
index ce675a7..ac0fc98 100644
--- a/lzma.h
+++ b/lzma.h
@@ -187,6 +187,9 @@
* need to worry about LZMA_API_STATIC. Also the calling convention is
* omitted on Cygwin but not on MinGW.
*/
+
+#define LZMA_API_STATIC
+
#ifndef LZMA_API_IMPORT
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
# define LZMA_API_IMPORT __declspec(dllimport)

View File

@ -1,13 +1,13 @@
diff --git a/libmodplug/modplug.h b/libmodplug/modplug.h
index 3ffbf9d..fd19ae5 100644
--- a/libmodplug/modplug.h
+++ b/libmodplug/modplug.h
@@ -11,6 +11,8 @@
extern "C" {
#endif
+#define MODPLUG_STATIC
+
#if defined(_WIN32) || defined(__CYGWIN__)
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
# define MODPLUG_EXPORT __declspec(dllexport)
diff --git a/libmodplug/modplug.h b/libmodplug/modplug.h
index 3ffbf9d..fd19ae5 100644
--- a/libmodplug/modplug.h
+++ b/libmodplug/modplug.h
@@ -11,6 +11,8 @@
extern "C" {
#endif
+#define MODPLUG_STATIC
+
#if defined(_WIN32) || defined(__CYGWIN__)
# if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
# define MODPLUG_EXPORT __declspec(dllexport)

View File

@ -1,28 +1,28 @@
diff --git a/lz4.h b/lz4.h
index 7420ad8..c1c3e56 100644
--- a/lz4.h
+++ b/lz4.h
@@ -73,6 +73,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4LIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/lz4frame.h b/lz4frame.h
index 3104d2e..4442461 100644
--- a/lz4frame.h
+++ b/lz4frame.h
@@ -55,6 +55,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4FLIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/lz4.h b/lz4.h
index 7420ad8..c1c3e56 100644
--- a/lz4.h
+++ b/lz4.h
@@ -73,6 +73,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4LIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/lz4frame.h b/lz4frame.h
index 3104d2e..4442461 100644
--- a/lz4frame.h
+++ b/lz4frame.h
@@ -55,6 +55,9 @@ extern "C" {
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
*/
+
+#define LZ4_DLL_IMPORT 1
+
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4FLIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)

View File

@ -1,51 +1,51 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c9c9c9..ae35185 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,26 +149,20 @@ endif ()
# Find PNG
if(NANA_CMAKE_ENABLE_PNG)
add_definitions(-DNANA_ENABLE_PNG)
- set(NANA_LINKS "${NANA_LINKS} -lpng")
if(NANA_CMAKE_LIBPNG_FROM_OS)
- find_package(PNG)
- if (PNG_FOUND)
- include_directories( ${PNG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBPNG_FROM_OS)
- endif(PNG_FOUND)
+ find_package(PNG REQUIRED)
+ include_directories(${PNG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_ENABLE_PNG)
# Find JPEG
if(NANA_CMAKE_ENABLE_JPEG)
add_definitions(-DNANA_ENABLE_JPEG)
- set(NANA_LINKS "${NANA_LINKS} -ljpeg")
if(NANA_CMAKE_LIBJPEG_FROM_OS)
- find_package(JPEG)
- if (JPEG_FOUND)
- include_directories( ${JPEG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBJPEG_FROM_OS)
- endif(JPEG_FOUND)
+ find_package(JPEG REQUIRED)
+ include_directories(${JPEG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_ENABLE_JPEG)
@@ -253,7 +247,12 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS})
include_directories(${NANA_INCLUDE_DIR})
add_library(${PROJECT_NAME} ${sources} )
-target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
+if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES})
+endif()
+if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES})
+endif()
# Headers: use INCLUDE_DIRECTORIES
# Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c9c9c9..ae35185 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,26 +149,20 @@ endif ()
# Find PNG
if(NANA_CMAKE_ENABLE_PNG)
add_definitions(-DNANA_ENABLE_PNG)
- set(NANA_LINKS "${NANA_LINKS} -lpng")
if(NANA_CMAKE_LIBPNG_FROM_OS)
- find_package(PNG)
- if (PNG_FOUND)
- include_directories( ${PNG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBPNG_FROM_OS)
- endif(PNG_FOUND)
+ find_package(PNG REQUIRED)
+ include_directories(${PNG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_LIBPNG_FROM_OS)
endif(NANA_CMAKE_ENABLE_PNG)
# Find JPEG
if(NANA_CMAKE_ENABLE_JPEG)
add_definitions(-DNANA_ENABLE_JPEG)
- set(NANA_LINKS "${NANA_LINKS} -ljpeg")
if(NANA_CMAKE_LIBJPEG_FROM_OS)
- find_package(JPEG)
- if (JPEG_FOUND)
- include_directories( ${JPEG_INCLUDE_DIRS})
- add_definitions(-DUSE_LIBJPEG_FROM_OS)
- endif(JPEG_FOUND)
+ find_package(JPEG REQUIRED)
+ include_directories(${JPEG_INCLUDE_DIRS})
+ add_definitions(-DUSE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_LIBJPEG_FROM_OS)
endif(NANA_CMAKE_ENABLE_JPEG)
@@ -253,7 +247,12 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS})
include_directories(${NANA_INCLUDE_DIR})
add_library(${PROJECT_NAME} ${sources} )
-target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
+if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES})
+endif()
+if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS)
+ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES})
+endif()
# Headers: use INCLUDE_DIRECTORIES
# Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES)

View File

@ -1,17 +1,17 @@
diff --git a/smpeg.h b/smpeg.h
index 6bc2dbd..d12c8f8 100644
--- a/smpeg.h
+++ b/smpeg.h
@@ -22,9 +22,9 @@
#ifndef _SMPEG_H_
#define _SMPEG_H_
-#include "SDL.h"
-#include "SDL_mutex.h"
-#include "SDL_audio.h"
+#include "SDL2/SDL.h"
+#include "SDL2/SDL_mutex.h"
+#include "SDL2/SDL_audio.h"
#include "MPEGframe.h"
#ifdef __cplusplus
diff --git a/smpeg.h b/smpeg.h
index 6bc2dbd..d12c8f8 100644
--- a/smpeg.h
+++ b/smpeg.h
@@ -22,9 +22,9 @@
#ifndef _SMPEG_H_
#define _SMPEG_H_
-#include "SDL.h"
-#include "SDL_mutex.h"
-#include "SDL_audio.h"
+#include "SDL2/SDL.h"
+#include "SDL2/SDL_mutex.h"
+#include "SDL2/SDL_audio.h"
#include "MPEGframe.h"
#ifdef __cplusplus