From 06047d91036130bce6fde44ee481582c1a979706 Mon Sep 17 00:00:00 2001 From: Benoit Neil Date: Mon, 6 Apr 2009 20:44:01 +0000 Subject: Added curl (exe) target, fixed static/dynamic linking errors. PS: Sorry if the added file has executable perms on Linux, I didn't found anything related to it... --- lib/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index f44abdf8b..b938000c0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -197,8 +197,10 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) IF(CURL_STATICLIB) + # Static lib SET(CURL_USER_DEFINED_DYNAMIC_OR_STATIC STATIC) ELSE() + # DLL / so dynamic lib SET(CURL_USER_DEFINED_DYNAMIC_OR_STATIC SHARED) ENDIF() @@ -214,13 +216,17 @@ IF(WIN32) ADD_DEFINITIONS( -D_USRDLL ) ENDIF() +ADD_DEFINITIONS( + -DBUILDING_LIBCURL +) + IF(CURL_ZLIB AND ZLIB_FOUND) TARGET_LINK_LIBRARIES(${LIB_NAME} ${ZLIB_LIBRARIES}) #ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ ) ENDIF() # IF(CURL_SSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE) - # LIST(APPEND DEPENDENCIES_NAMES OpenSSL) + # TARGET_LINK_LIBRARIES(${LIB_NAME} ${OPENSSL_LIBRARIES}) # ADD_DEFINITIONS( -DUSE_SSLEAY ) # ENDIF() -- cgit v1.2.1