Support specify CURL paths
This commit is contained in:
@@ -2,7 +2,6 @@ cmake_minimum_required (VERSION 2.6...3.10.2)
|
|||||||
project (CGenerator)
|
project (CGenerator)
|
||||||
|
|
||||||
cmake_policy(SET CMP0063 NEW)
|
cmake_policy(SET CMP0063 NEW)
|
||||||
|
|
||||||
set(CMAKE_C_VISIBILITY_PRESET default)
|
set(CMAKE_C_VISIBILITY_PRESET default)
|
||||||
set(CMAKE_CXX_VISIBILITY_PRESET default)
|
set(CMAKE_CXX_VISIBILITY_PRESET default)
|
||||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
|
||||||
@@ -34,12 +33,17 @@ set(PROJECT_VERSION_MAJOR 0)
|
|||||||
set(PROJECT_VERSION_MINOR 0)
|
set(PROJECT_VERSION_MINOR 0)
|
||||||
set(PROJECT_VERSION_PATCH 1)
|
set(PROJECT_VERSION_PATCH 1)
|
||||||
|
|
||||||
find_package(CURL 7.58.0 REQUIRED)
|
if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES))
|
||||||
if(CURL_FOUND)
|
|
||||||
include_directories(${CURL_INCLUDE_DIR})
|
include_directories(${CURL_INCLUDE_DIR})
|
||||||
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
|
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
|
||||||
else(CURL_FOUND)
|
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.")
|
message(FATAL_ERROR "Could not find the CURL library and development files.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
|
|||||||
Reference in New Issue
Block a user