Merge pull request #108 from katepangLiu/cmake-specify-curl

Support specify CURL paths
This commit is contained in:
Kubernetes Prow Robot
2022-03-03 08:37:49 -08:00
committed by GitHub

View File

@@ -2,7 +2,6 @@ cmake_minimum_required (VERSION 2.6...3.10.2)
project (CGenerator)
cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
set(CMAKE_CXX_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
@@ -34,12 +33,17 @@ set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 0)
set(PROJECT_VERSION_PATCH 1)
find_package(CURL 7.58.0 REQUIRED)
if(CURL_FOUND)
if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES))
include_directories(${CURL_INCLUDE_DIR})
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
else(CURL_FOUND)
message(FATAL_ERROR "Could not find the CURL library and development files.")
else()
find_package(CURL 7.58.0 REQUIRED)
if(CURL_FOUND)
include_directories(${CURL_INCLUDE_DIR})
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
else(CURL_FOUND)
message(FATAL_ERROR "Could not find the CURL library and development files.")
endif()
endif()
set(SRCS