Use the VS 2015 libraries for MSVC 14 (#16359)

* Use the VS 2015 libraries for MSVC 14

When compiling with MSVC 14, the linker cannot find `libpng-2015.lib`, `libtiff-2015.lib`, `libjpeg-2015.lib` and `libglfw-2015.lib`. This commit fixes that problem

* Remove the -2015 suffix from the non-MSVC 14 part on libchipmunk

* Fix Linux compiler errors

Check If we are on Windows then check for VS 2015.
This commit is contained in:
Furkan Üzümcü 2016-08-16 11:57:03 +03:00 committed by minggo
parent 7540a64fd8
commit fe6c52c1b4
1 changed files with 45 additions and 5 deletions

View File

@ -4,7 +4,15 @@
set(_chipmunk_inc chipmunk/chipmunk.h)
set(_chipmunk_inc_paths include)
if(WINDOWS)
if (${MSVC_VERSION} STREQUAL "1900")
set(_chipmunk_libs chipmunk libchipmunk-2015)
else()
set(_chipmunk_libs chipmunk libchipmunk)
endif(${MSVC_VERSION})
else()
set(_chipmunk_libs chipmunk libchipmunk)
endif(WINDOWS)
set(_curl_inc curl/curl.h)
# order: curl, ssl, crypto
@ -16,13 +24,37 @@ set(_freetype2_inc_paths freetype2)
set(_freetype2_libs freetype freetype250)
set(_jpeg_inc jpeglib.h)
if(WINDOWS)
if (${MSVC_VERSION} STREQUAL "1900")
set(_jpeg_libs jpeg libjpeg-2015)
else()
set(_jpeg_libs jpeg libjpeg)
endif(${MSVC_VERSION})
else()
set(_jpeg_libs jpeg libjpeg)
endif(WINDOWS)
set(_png_inc png.h)
if(WINDOWS)
if (${MSVC_VERSION} STREQUAL "1900")
set(_png_libs png libpng-2015)
else()
set(_png_libs png libpng)
endif(${MSVC_VERSION})
else()
set(_png_libs png libpng)
endif(WINDOWS)
set(_tiff_inc tiff.h)
if(WINDOWS)
if (${MSVC_VERSION} STREQUAL "1900")
set(_tiff_libs tiff libtiff-2015)
else()
set(_tiff_libs tiff libtiff)
endif(${MSVC_VERSION})
else()
set(_tiff_libs tiff libtiff)
endif(WINDOWS)
set(_webp_inc decode.h)
set(_webp_libs webp libwebp)
@ -31,7 +63,15 @@ set(_websockets_inc libwebsockets.h)
set(_websockets_libs websockets libwebsockets)
set(_glfw3_inc glfw3.h)
if(WINDOWS)
if (${MSVC_VERSION} STREQUAL "1900")
set(_glfw3_libs glfw3-2015 libglfw3)
else()
set(_glfw3_libs glfw3 libglfw3)
endif(${MSVC_VERSION})
else()
set(_glfw3_libs glfw3 libglfw3)
endif(WINDOWS)
set(_sqlite3_inc sqlite3.h)
set(_sqlite3_libs sqlite3)