Skip to content

Commit

Permalink
Update CURL install directory
Browse files Browse the repository at this point in the history
  • Loading branch information
RavenX8 committed May 11, 2018
1 parent aecb81a commit 798cd1e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions cmake/modules/BuildCURL.cmake
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
set(CURL_INSTALL_DIR ${CMAKE_THIRD_PARTY_DIR})

if(WIN32)
ExternalProject_Add(
curl
GIT_REPOSITORY https://github.com/curl/curl.git
GIT_TAG curl-7_59_0
CMAKE_ARGS -DBUILD_TESTING=OFF -DHTTP_ONLY=ON
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CURL_INSTALL_DIR} -DBUILD_TESTING=OFF -DHTTP_ONLY=ON
INSTALL_DIR ${CURL_INSTALL_DIR}
)
else()
ExternalProject_Add(
curl
GIT_REPOSITORY https://github.com/curl/curl.git
GIT_TAG curl-7_59_0
CMAKE_ARGS -DBUILD_TESTING=OFF -DHTTP_ONLY=ON
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CURL_INSTALL_DIR} -DBUILD_TESTING=OFF -DHTTP_ONLY=ON
INSTALL_DIR ${CURL_INSTALL_DIR}
)
endif()

ExternalProject_Get_Property(
curl
binary_dir
install_dir
)

set(CURL_INCLUDE_DIRS "${source_dir}/include")
set(CURL_INCLUDE_DIRS "${install_dir}/include")

if(WIN32)
set(CURL_LIBRARIES "${binary_dir}/${CMAKE_BUILD_TYPE}/libcurl.lib")
set(CURL_INSTALL_LIBS "${binary_dir}/${CMAKE_BUILD_TYPE}/libcurl.dll")
set(CURL_LIBRARIES "${install_dir}/${CMAKE_BUILD_TYPE}/libcurl.lib")
set(CURL_INSTALL_LIBS "${install_dir}/${CMAKE_BUILD_TYPE}/libcurl.dll")
else()
set(CURL_LIBRARIES "${binary_dir}/libcurl.so")
set(CURL_INSTALL_LIBS "${binary_dir}/libcurl.so")
set(CURL_LIBRARIES "${install_dir}/lib/libcurl.so")
set(CURL_INSTALL_LIBS "${install_dir}/lib/libcurl.so")
endif()

install_external_library(curl ${CURL_INSTALL_LIBS})

0 comments on commit 798cd1e

Please sign in to comment.