diff --git a/cmake/Modules/CocosUsePrebuiltLibs.cmake b/cmake/Modules/CocosUsePrebuiltLibs.cmake index b30fb16fa6..06f57fd94b 100644 --- a/cmake/Modules/CocosUsePrebuiltLibs.cmake +++ b/cmake/Modules/CocosUsePrebuiltLibs.cmake @@ -4,7 +4,15 @@ set(_chipmunk_inc chipmunk/chipmunk.h) set(_chipmunk_inc_paths include) -set(_chipmunk_libs chipmunk libchipmunk) +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) -set(_jpeg_libs jpeg libjpeg) +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) -set(_png_libs png libpng) +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) -set(_tiff_libs tiff libtiff) +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) -set(_glfw3_libs glfw3 libglfw3) +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)