Merge pull request #108 from katepangLiu/cmake-specify-curl
Support specify CURL paths
This commit is contained in:
@@ -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,6 +33,10 @@ set(PROJECT_VERSION_MAJOR 0)
|
||||
set(PROJECT_VERSION_MINOR 0)
|
||||
set(PROJECT_VERSION_PATCH 1)
|
||||
|
||||
if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES))
|
||||
include_directories(${CURL_INCLUDE_DIR})
|
||||
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
|
||||
else()
|
||||
find_package(CURL 7.58.0 REQUIRED)
|
||||
if(CURL_FOUND)
|
||||
include_directories(${CURL_INCLUDE_DIR})
|
||||
@@ -41,6 +44,7 @@ if(CURL_FOUND)
|
||||
else(CURL_FOUND)
|
||||
message(FATAL_ERROR "Could not find the CURL library and development files.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(SRCS
|
||||
src/list.c
|
||||
|
||||
Reference in New Issue
Block a user