Mercurial > hg > orthanc
comparison Resources/CMake/LibCurlConfiguration.cmake @ 30:89383427856a
removal of old stuff for curl
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 29 Aug 2012 15:29:08 +0200 |
parents | 042ac60f5bf9 |
children | 0c3e317f35e8 |
comparison
equal
deleted
inserted
replaced
29:042ac60f5bf9 | 30:89383427856a |
---|---|
1 if (${STATIC_BUILD}) | 1 if (${STATIC_BUILD}) |
2 SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-7.26.0) | 2 SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-7.26.0) |
3 DownloadPackage("http://curl.haxx.se/download/curl-7.26.0.tar.gz" "${CURL_SOURCES_DIR}" "" "") | 3 DownloadPackage("http://curl.haxx.se/download/curl-7.26.0.tar.gz" "${CURL_SOURCES_DIR}" "" "") |
4 | 4 |
5 if (0) | |
6 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | |
7 if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") | |
8 SET(SOURCE_CONFIG ${CMAKE_SOURCE_DIR}/Resources/libcurl/WithSsl/x86_64-linux) | |
9 elseif ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") | |
10 SET(SOURCE_CONFIG ${CMAKE_SOURCE_DIR}/Resources/libcurl/i686-pc-linux-gnu) | |
11 else() | |
12 message(FATAL_ERROR "Support your platform here") | |
13 endif() | |
14 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
15 if (${MSVC}) | |
16 SET(SOURCE_CONFIG ${CMAKE_SOURCE_DIR}/Resources/libcurl/msvc) | |
17 else() | |
18 SET(SOURCE_CONFIG ${CMAKE_SOURCE_DIR}/Resources/libcurl/i586-mingw32msvc) | |
19 endif() | |
20 else() | |
21 message(FATAL_ERROR "Support your platform here") | |
22 endif() | |
23 | |
24 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | |
25 configure_file("${SOURCE_CONFIG}/curl_config.h" "${CURL_SOURCES_DIR}/lib/curl_config.h" COPYONLY) | |
26 configure_file("${SOURCE_CONFIG}/curlbuild.h" "${CURL_SOURCES_DIR}/include/curl/curlbuild.h" COPYONLY) | |
27 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
28 configure_file("${SOURCE_CONFIG}/curlbuild.h" "${CURL_SOURCES_DIR}/include/curl/curlbuild.h" COPYONLY) | |
29 endif() | |
30 endif() | |
31 | |
32 include_directories(${CURL_SOURCES_DIR}/include) | 5 include_directories(${CURL_SOURCES_DIR}/include) |
33 | |
34 AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES) | 6 AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES) |
35 source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*) | 7 source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*) |
36 | 8 |
37 #list(APPEND THIRD_PARTY_SOURCES ${CURL_SOURCES}) | |
38 add_library(Curl STATIC ${CURL_SOURCES}) | 9 add_library(Curl STATIC ${CURL_SOURCES}) |
39 link_libraries(Curl) | 10 link_libraries(Curl) |
40 | 11 |
41 add_definitions( | 12 add_definitions( |
42 -DCURL_STATICLIB=1 | 13 -DCURL_STATICLIB=1 |
65 -DUSE_SSLEAY=1 | 36 -DUSE_SSLEAY=1 |
66 ) | 37 ) |
67 endif() | 38 endif() |
68 | 39 |
69 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | 40 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
70 #set_property( | |
71 # SOURCE ${CURL_SOURCES} | |
72 # PROPERTY COMPILE_DEFINITIONS HAVE_CONFIG_H) | |
73 if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") | 41 if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") |
74 SET(TMP_OS "x86_64") | 42 SET(TMP_OS "x86_64") |
75 else() | 43 else() |
76 SET(TMP_OS "x86") | 44 SET(TMP_OS "x86") |
77 endif() | 45 endif() |