Externals: Add libcurl.

This commit is contained in:
Pierre Bourdon
2016-06-17 02:28:34 +02:00
parent fe51de23f1
commit c4f5c471bb
291 changed files with 122838 additions and 1 deletions

View File

@ -16,6 +16,14 @@ option(ENABLE_LTO "Enables Link Time Optimization" OFF)
option(ENABLE_GENERIC "Enables generic build that should run on any little-endian host" OFF)
option(ENABLE_HEADLESS "Enables running Dolphin as a headless variant" OFF)
# Maintainers: if you consider blanket disabling this for your users, please
# consider the following points:
# * No data is being sent without explicit user approval (pop up box at first
# launch).
# * The Dolphin team relies on the data in order to understand the behavior
# of our software in the wild.
option(ENABLE_ANALYTICS "Enables opt-in Analytics collection" ON)
# Enable SDL for default on operating systems that aren't OSX, Android, Linux or Windows.
if(NOT APPLE AND NOT ANDROID AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT MSVC)
option(ENABLE_SDL "Enables SDL as a generic controller backend" ON)
@ -587,6 +595,11 @@ if(UNIX)
add_definitions(-DUSE_MEMORYWATCHER=1)
endif()
if(ENABLE_ANALYTICS)
message("Enabling analytics collection (subject to end-user opt-in)")
add_definitions(-DUSE_ANALYTICS=1)
endif()
########################################
# Setup include directories (and make sure they are preferred over the Externals)
#
@ -765,6 +778,17 @@ else()
include_directories(Externals/mbedtls/include)
endif()
include(FindCURL OPTIONAL)
if(CURL_FOUND)
message("Using shared libcurl")
include_directories(${CURL_INCLUDE_DIRS})
else()
message("Using static libcurl from Externals")
add_subdirectory(Externals/curl)
set(CURL_LIBRARIES curl)
include_directories(BEFORE Externals/curl/include)
endif()
if(NOT APPLE)
check_lib(SOIL "(no .pc for SOIL)" SOIL SOIL/SOIL.h QUIET)
endif()