2021-08-23 20:38:52 +08:00
|
|
|
set(lib_name curl)
|
|
|
|
set(target_name lib${lib_name})
|
2020-11-16 14:47:43 +08:00
|
|
|
|
2021-08-23 20:38:52 +08:00
|
|
|
project(${lib_name})
|
2020-11-16 14:47:43 +08:00
|
|
|
|
2021-08-23 20:38:52 +08:00
|
|
|
include(../cmake/CocosExternalConfig.cmake)
|
2020-11-16 14:47:43 +08:00
|
|
|
|
2021-08-23 20:38:52 +08:00
|
|
|
if(WINDOWS)
|
|
|
|
add_library(${target_name} SHARED IMPORTED GLOBAL)
|
2021-04-28 12:43:51 +08:00
|
|
|
else()
|
2021-08-23 20:38:52 +08:00
|
|
|
add_library(${target_name} STATIC IMPORTED GLOBAL)
|
2021-04-28 12:43:51 +08:00
|
|
|
endif()
|
|
|
|
|
2021-08-23 20:38:52 +08:00
|
|
|
set_target_properties(${target_name} PROPERTIES
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include/"
|
2021-04-28 12:43:51 +08:00
|
|
|
)
|
|
|
|
|
2021-08-23 20:38:52 +08:00
|
|
|
if(WINDOWS)
|
|
|
|
set_target_properties(${target_name} PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${platform_spec_path}/lib${lib_name}.dll"
|
|
|
|
IMPORTED_IMPLIB "${platform_spec_path}/lib${lib_name}_imp.lib"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
set_target_properties(${target_name} PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${platform_spec_path}/lib${lib_name}.a"
|
|
|
|
)
|
2020-11-16 14:47:43 +08:00
|
|
|
endif()
|