comparison Resources/CMake/LibCurlConfiguration.cmake @ 8:3a584803783e

build with visual studio
author jodogne
date Fri, 20 Jul 2012 11:00:49 +0200
parents 67a6978503b7
children 2fcf8e5e789c
comparison
equal deleted inserted replaced
6:9d483cf71d17 8:3a584803783e
21 endif() 21 endif()
22 22
23 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") 23 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
24 configure_file("${SOURCE_CONFIG}/curl_config.h" "${CURL_SOURCES_DIR}/lib/curl_config.h" COPYONLY) 24 configure_file("${SOURCE_CONFIG}/curl_config.h" "${CURL_SOURCES_DIR}/lib/curl_config.h" COPYONLY)
25 configure_file("${SOURCE_CONFIG}/curlbuild.h" "${CURL_SOURCES_DIR}/include/curl/curlbuild.h" COPYONLY) 25 configure_file("${SOURCE_CONFIG}/curlbuild.h" "${CURL_SOURCES_DIR}/include/curl/curlbuild.h" COPYONLY)
26 set_property(
27 SOURCE ${CURL_SOURCES}
28 PROPERTY COMPILE_DEFINITIONS HAVE_CONFIG_H)
26 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 29 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
27 configure_file("${SOURCE_CONFIG}/curlbuild.h" "${CURL_SOURCES_DIR}/include/curl/curlbuild.h" COPYONLY) 30 configure_file("${SOURCE_CONFIG}/curlbuild.h" "${CURL_SOURCES_DIR}/include/curl/curlbuild.h" COPYONLY)
28 endif() 31 endif()
29 32
30 include_directories(${CURL_SOURCES_DIR}/include) 33 include_directories(${CURL_SOURCES_DIR}/include)
31 34
32 AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES) 35 AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES)
33 36 source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*)
34 set_property(
35 SOURCE ${CURL_SOURCES}
36 PROPERTY COMPILE_DEFINITIONS HAVE_CONFIG_H)
37 37
38 list(APPEND THIRD_PARTY_SOURCES ${CURL_SOURCES}) 38 list(APPEND THIRD_PARTY_SOURCES ${CURL_SOURCES})
39 39
40 add_definitions( 40 add_definitions(
41 -DCURL_STATICLIB=1 41 -DCURL_STATICLIB=1
42 -DBUILDING_LIBCURL=1 42 -DBUILDING_LIBCURL=1
43 -DCURL_DISABLE_LDAPS=1
44 -DCURL_DISABLE_LDAP=1
45 -D_WIN32_WINNT=0x0501
43 ) 46 )
44
45 #add_library(libcurl STATIC ${CURL_SOURCES})
46 #link_libraries(libcurl)
47 47
48 else() 48 else()
49 include(FindCURL) 49 include(FindCURL)
50 include_directories(${CURL_INCLUDE_DIRS}) 50 include_directories(${CURL_INCLUDE_DIRS})
51 link_libraries(${CURL_LIBRARIES}) 51 link_libraries(${CURL_LIBRARIES})