]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: make libcurl library output name configurable
authorRalph Langendam <Ralph.Langendam@uniface.com>
Thu, 15 Apr 2021 14:54:23 +0000 (16:54 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Apr 2021 08:03:07 +0000 (10:03 +0200)
Closes #6899

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

index a58b47b8652646accdc52ee678b6e2e7a0e6b7e1..37ce1c8e2773abe934a4a24a42cfab739f23c8ad 100644 (file)
@@ -19,7 +19,7 @@
 # KIND, either express or implied.
 #
 ###########################################################################
-set(LIB_NAME libcurl)
+set(LIB_NAME libcurl CACHE STRING "Basename of the curl library")
 
 if(BUILD_SHARED_LIBS)
   set(CURL_STATICLIB NO)
index 0982cfe6e46597c00a1ef26a899c1c5fbf672231..3804c26b17ee9d89c591480110c8b71f863333df 100644 (file)
@@ -97,7 +97,7 @@ include_directories(
   )
 
 #Build curl executable
-target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS})
+target_link_libraries(${EXE_NAME} ${LIB_NAME} ${CURL_LIBS})
 
 ################################################################################
 
index 2bcf77874f778bbad104a21bece72c35a90adccd..43a6c41a745d8a0c4c0af16a888c1ef39a7af30a 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} libcurl ${CURL_LIBS})
+  target_link_libraries(${TEST_NAME} ${LIB_NAME} ${CURL_LIBS})
 
   set_target_properties(${TEST_NAME}
     PROPERTIES COMPILE_DEFINITIONS ${UPPER_TEST_NAME})
index a680c5308979a0a7f4b64319b0fb0614bd30f094..889c792d368134ccc2a4f5811a4bb4ab783793f2 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} libcurl ${CURL_LIBS})
+  target_link_libraries(${_testname} ${LIB_NAME} ${CURL_LIBS})
   set_target_properties(${_testname}
       PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
 endforeach()