Fixed mingw compilation.

It should be possible to simplify it with something like
find_library(CURL_LIBRARIES NAMES libcurl libcurldll PATHS "${PROJECT_SOURCE_DIR}/dependencies/lib")
so you can look if it works on Visual Studio.

And as far as I see pkgconfig is used only on unix. Btw. I'm also not sure if it should be if(UNIX AND NOT APPLE) ?
This commit is contained in:
deve
2017-04-06 11:39:53 +02:00
parent 2ba148a84e
commit 70d7fdd197

View File

@@ -145,10 +145,10 @@ else()
endif()
if(BUILD_RECORDER)
include(FindPkgConfig)
find_library(TURBOJPEG_LIBRARY NAMES turbojpeg libturbojpeg PATHS "${PROJECT_SOURCE_DIR}/dependencies/lib")
mark_as_advanced(TURBOJPEG_LIBRARY)
if(UNIX)
include(FindPkgConfig)
pkg_check_modules(VPX vpx)
else()
find_path(VPX_INCLUDEDIR NAMES vpx/vpx_codec.h PATHS "${PROJECT_SOURCE_DIR}/dependencies/include")
@@ -401,8 +401,10 @@ else()
endif()
# CURL
if(WIN32)
if(MSVC)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/dependencies/lib/libcurl.lib)
elseif(MINGW)
target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/dependencies/lib/libcurldll.a)
else()
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIRS})