Skip to content

Bug: fix windows curl #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 30, 2019
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ build:
project: $(APPVEYOR_BUILD_FOLDER)\Ark-Cpp-Client.sln

test_script:
- cmd: '%APPVEYOR_BUILD_FOLDER%\Bin\%CONFIGURATION%\Ark-Cpp-Client-tests.exe'
- cmd: '%APPVEYOR_BUILD_FOLDER%\test\%CONFIGURATION%\Ark-Cpp-Client-tests.exe'
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set(CMAKE_CXX_STANDARD 11)

set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR})

set(BUILD_SHARED_LIBS OFF)

if (MSVC)
add_definitions(
-D_CRT_SECURE_NO_WARNINGS
Expand Down
17 changes: 13 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,23 @@ include_directories(${PROJECT_SOURCE_DIR})
set(BUILD_TESTING OFF)
set(HTTP_ONLY ON)
set(CMAKE_USE_LIBSSH2 OFF)
set(CURL_STATICLIB true)
set(CURL_STATIC_CRT ON)
set(BUILD_CURL_EXE false)

if (APPLE)
set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl/lib")
set(OPENSSL_INCLUDE_DIR "/usr/local/opt/openssl/include")
endif()

add_subdirectory(${PROJECT_SOURCE_DIR}/lib/curl)

include_directories(${PROJECT_SOURCE_DIR}/lib/curl/include)

if (UNIX AND NOT APPLE)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/curl)
target_link_libraries(${PROJECT_NAME} PUBLIC libcurl)
if (APPLE)
target_link_libraries(${PROJECT_NAME} PUBLIC CURL)
else()
target_link_libraries(${PROJECT_NAME} PUBLIC CURL)
target_link_libraries(${PROJECT_NAME} PUBLIC libcurl)
endif()

# ------------------------------------------------------------------------------
Expand Down