Path: blob/main/external/curl/tests/http/clients/CMakeLists.txt
2066 views
#***************************************************************************1# _ _ ____ _2# Project ___| | | | _ \| |3# / __| | | | |_) | |4# | (__| |_| | _ <| |___5# \___|\___/|_| \_\_____|6#7# Copyright (C) Daniel Stenberg, <[email protected]>, et al.8#9# This software is licensed as described in the file COPYING, which10# you should have received as part of this distribution. The terms11# are also available at https://curl.se/docs/copyright.html.12#13# You may opt to use, copy, modify, merge, publish, distribute and/or sell14# copies of the Software, and permit persons to whom the Software is15# furnished to do so, under the terms of the COPYING file.16#17# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY18# KIND, either express or implied.19#20# SPDX-License-Identifier: curl21#22###########################################################################2324add_custom_target(test-http-clients)2526# Get 'check_PROGRAMS' variable27curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")28include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")2930foreach(_target IN LISTS check_PROGRAMS)31set(_target_name "curlt-client-${_target}")32add_executable(${_target_name} EXCLUDE_FROM_ALL "${_target}.c")33add_dependencies(testdeps ${_target_name})34add_dependencies(test-http-clients ${_target_name})35target_include_directories(${_target_name} PRIVATE36"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"37"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"38)39target_link_libraries(${_target_name} ${LIB_SELECTED} ${CURL_LIBS})40target_compile_definitions(${_target_name} PRIVATE "CURL_NO_OLDIES" "$<$<BOOL:MSVC>:_CRT_SECURE_NO_DEPRECATE>")41if(LIB_SELECTED STREQUAL LIB_STATIC AND WIN32)42set_property(TARGET ${_target_name} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB")43endif()44set_target_properties(${_target_name} PROPERTIES45OUTPUT_NAME "${_target}" UNITY_BUILD OFF46PROJECT_LABEL "Test client ${_target}")47endforeach()484950