mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 10:51:04 +00:00
Added libcurl submodule and CMake code for building it.
This commit is contained in:
parent
9d8e1f7a92
commit
3fed45a76a
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -7,3 +7,6 @@
|
|||||||
[submodule "nihstro"]
|
[submodule "nihstro"]
|
||||||
path = externals/nihstro
|
path = externals/nihstro
|
||||||
url = https://github.com/neobrain/nihstro.git
|
url = https://github.com/neobrain/nihstro.git
|
||||||
|
[submodule "curl"]
|
||||||
|
path = externals/curl
|
||||||
|
url = https://github.com/bagder/curl.git
|
||||||
|
@ -25,5 +25,5 @@ if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
|||||||
| sudo tar -xz -C /usr/local --strip-components=1
|
| sudo tar -xz -C /usr/local --strip-components=1
|
||||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
brew tap homebrew/versions
|
brew tap homebrew/versions
|
||||||
brew install qt5 glfw3 pkgconfig
|
brew install qt5 glfw3 pkgconfig curl
|
||||||
fi
|
fi
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# CMake 2.8.11 required for Qt5 settings to be applied automatically on
|
# CMake 2.8.11 required for Qt5 settings to be applied automatically on
|
||||||
# dependent libraries.
|
# dependent libraries.
|
||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
include(ExternalProject)
|
||||||
|
|
||||||
project(citra)
|
project(citra)
|
||||||
|
|
||||||
@ -123,7 +124,7 @@ IF (APPLE)
|
|||||||
FIND_LIBRARY(IOKIT_LIBRARY IOKit) # GLFW dependency
|
FIND_LIBRARY(IOKIT_LIBRARY IOKit) # GLFW dependency
|
||||||
FIND_LIBRARY(COREVIDEO_LIBRARY CoreVideo) # GLFW dependency
|
FIND_LIBRARY(COREVIDEO_LIBRARY CoreVideo) # GLFW dependency
|
||||||
set(PLATFORM_LIBRARIES iconv ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
|
set(PLATFORM_LIBRARIES iconv ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
||||||
ELSEIF(MINGW)
|
ELSEIF(MINGW)
|
||||||
@ -185,6 +186,26 @@ set(INI_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/externals/inih")
|
|||||||
include_directories(${INI_PREFIX})
|
include_directories(${INI_PREFIX})
|
||||||
add_subdirectory(${INI_PREFIX})
|
add_subdirectory(${INI_PREFIX})
|
||||||
|
|
||||||
|
find_package(CURL 7.28.0)
|
||||||
|
if (NOT CURL_FOUND)
|
||||||
|
set(CURL_SOURCE_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/externals/curl")
|
||||||
|
set(CURL_BUILT_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/externals/curl")
|
||||||
|
externalproject_add(
|
||||||
|
PREFIX SOURCE_DIR ${CURL_SOURCE_PREFIX}
|
||||||
|
CMAKE_CACHE_ARGS
|
||||||
|
-DBUILD_CURL_EXE:string=off
|
||||||
|
-DBUILD_CURL_TESTS:string=off
|
||||||
|
-DHTTP_ONLY:string=on
|
||||||
|
-DENABLE_MANUAL:string=off
|
||||||
|
-DCMAKE_INSTALL_PREFIX:string=${CURL_BUILT_PREFIX}
|
||||||
|
)
|
||||||
|
include_directories("${CURL_BUILT_PREFIX}/include")
|
||||||
|
link_directories("${CURL_BUILT_PREFIX}/lib")
|
||||||
|
set(CURL_LIBRARIES "curl")
|
||||||
|
else()
|
||||||
|
include_directories(${CURL_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(externals/nihstro/include)
|
include_directories(externals/nihstro/include)
|
||||||
|
|
||||||
# process subdirectories
|
# process subdirectories
|
||||||
|
@ -16,7 +16,7 @@ configuration:
|
|||||||
- Release
|
- Release
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- git submodule update --init --recursive --depth 20
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
|
1
externals/curl
vendored
Submodule
1
externals/curl
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 26cb9f1646e9b6be7925c18e439a683ca4c31555
|
@ -16,6 +16,6 @@ create_directory_groups(${SRCS} ${HEADERS})
|
|||||||
add_executable(citra ${SRCS} ${HEADERS})
|
add_executable(citra ${SRCS} ${HEADERS})
|
||||||
target_link_libraries(citra core common video_core)
|
target_link_libraries(citra core common video_core)
|
||||||
target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih)
|
target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih)
|
||||||
target_link_libraries(citra ${PLATFORM_LIBRARIES})
|
target_link_libraries(citra ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES})
|
||||||
|
|
||||||
#install(TARGETS citra RUNTIME DESTINATION ${bindir})
|
#install(TARGETS citra RUNTIME DESTINATION ${bindir})
|
||||||
|
@ -71,6 +71,6 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
target_link_libraries(citra-qt core common video_core qhexedit)
|
target_link_libraries(citra-qt core common video_core qhexedit)
|
||||||
target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS})
|
target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS})
|
||||||
target_link_libraries(citra-qt ${PLATFORM_LIBRARIES})
|
target_link_libraries(citra-qt ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES})
|
||||||
|
|
||||||
#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir})
|
#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir})
|
||||||
|
Loading…
Reference in New Issue
Block a user