]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Revert "cmake: make libcurl library output name configurable"
authorDaniel Stenberg <daniel@haxx.se>
Wed, 21 Apr 2021 13:03:04 +0000 (15:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Apr 2021 13:03:26 +0000 (15:03 +0200)
This reverts commit 1cba36d2166c396f987eea587cf92671b27acb92.

CMake provides properties that can be set on a target to rename the
output artifact without changing the name of a target.

Ref: #6899

lib/CMakeLists.txt
src/CMakeLists.txt
tests/libtest/CMakeLists.txt
tests/unit/CMakeLists.txt

index 37ce1c8e2773abe934a4a24a42cfab739f23c8ad..a58b47b8652646accdc52ee678b6e2e7a0e6b7e1 100644 (file)
@@ -19,7 +19,7 @@
 # KIND, either express or implied.
 #
 ###########################################################################
-set(LIB_NAME libcurl CACHE STRING "Basename of the curl library")
+set(LIB_NAME libcurl)
 
 if(BUILD_SHARED_LIBS)
   set(CURL_STATICLIB NO)
index 3804c26b17ee9d89c591480110c8b71f863333df..0982cfe6e46597c00a1ef26a899c1c5fbf672231 100644 (file)
@@ -97,7 +97,7 @@ include_directories(
   )
 
 #Build curl executable
-target_link_libraries(${EXE_NAME} ${LIB_NAME} ${CURL_LIBS})
+target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS})
 
 ################################################################################
 
index 43a6c41a745d8a0c4c0af16a888c1ef39a7af30a..2bcf77874f778bbad104a21bece72c35a90adccd 100644 (file)
@@ -36,7 +36,7 @@ function(setup_test TEST_NAME)          # ARGN are the files in the test
     include_directories(${CARES_INCLUDE_DIR})
   endif()
 
-  target_link_libraries(${TEST_NAME} ${LIB_NAME} ${CURL_LIBS})
+  target_link_libraries(${TEST_NAME} libcurl ${CURL_LIBS})
 
   set_target_properties(${TEST_NAME}
     PROPERTIES COMPILE_DEFINITIONS ${UPPER_TEST_NAME})
index 889c792d368134ccc2a4f5811a4bb4ab783793f2..a680c5308979a0a7f4b64319b0fb0614bd30f094 100644 (file)
@@ -63,7 +63,7 @@ foreach(_testfile ${UT_SRC})
   get_filename_component(_testname ${_testfile} NAME_WE)
   add_executable(${_testname} EXCLUDE_FROM_ALL ${_testfile} ${UT_COMMON_FILES})
   #add_dependencies(testdeps ${_testname})
-  target_link_libraries(${_testname} ${LIB_NAME} ${CURL_LIBS})
+  target_link_libraries(${_testname} libcurl ${CURL_LIBS})
   set_target_properties(${_testname}
       PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
 endforeach()