aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBenoit Neil <suky0001@free.fr>2009-04-06 19:43:52 +0000
committerBenoit Neil <suky0001@free.fr>2009-04-06 19:43:52 +0000
commit2362637e9049d01138ee8d4fd4c8cafb563f693a (patch)
tree52ecc67bcbb66717eafa17651b48fb193c5e8dff /lib
parentedd02607e293bf8e09b0491ab204af2616e43c70 (diff)
Removed the "lib" prefix under linux ("was "liblibcurl") and fixed import library name under Win32 (Added "_imp" for dynamically linked).
Diffstat (limited to 'lib')
-rw-r--r--lib/CMakeLists.txt27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index a1dbfbcf8..f44abdf8b 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -224,12 +224,21 @@ ENDIF()
# ADD_DEFINITIONS( -DUSE_SSLEAY )
# ENDIF()
-# IF(MSVC)
- # IF(NOT BUILD_RELEASE_DEBUG_DIRS)
- # # Ugly workaround to remove the "/debug" or "/release" in each output
- # SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../")
- # SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
- # ENDIF()
- # # Add "_imp" as a suffix before the extension
- # SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
-# ENDIF()
+# Remove the "lib" prefix since the library is already named "libcurl".
+SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "")
+SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "")
+
+IF(MSVC)
+ IF(NOT BUILD_RELEASE_DEBUG_DIRS)
+ # Ugly workaround to remove the "/debug" or "/release" in each output
+ SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../")
+ SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
+ ENDIF()
+ENDIF()
+
+IF(WIN32)
+ IF(NOT CURL_STATICLIB)
+ # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib"
+ SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
+ ENDIF()
+ENDIF()