Skip to content

Commit 94d85b5

Browse files
authored
Merge pull request #108 from katepangLiu/cmake-specify-curl
Support specify CURL paths
2 parents cbe91d8 + b49469d commit 94d85b5

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

kubernetes/CMakeLists.txt

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ cmake_minimum_required (VERSION 2.6...3.10.2)
22
project (CGenerator)
33

44
cmake_policy(SET CMP0063 NEW)
5-
65
set(CMAKE_C_VISIBILITY_PRESET default)
76
set(CMAKE_CXX_VISIBILITY_PRESET default)
87
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
@@ -34,12 +33,17 @@ set(PROJECT_VERSION_MAJOR 0)
3433
set(PROJECT_VERSION_MINOR 0)
3534
set(PROJECT_VERSION_PATCH 1)
3635

37-
find_package(CURL 7.58.0 REQUIRED)
38-
if(CURL_FOUND)
36+
if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES))
3937
include_directories(${CURL_INCLUDE_DIR})
4038
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
41-
else(CURL_FOUND)
42-
message(FATAL_ERROR "Could not find the CURL library and development files.")
39+
else()
40+
find_package(CURL 7.58.0 REQUIRED)
41+
if(CURL_FOUND)
42+
include_directories(${CURL_INCLUDE_DIR})
43+
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
44+
else(CURL_FOUND)
45+
message(FATAL_ERROR "Could not find the CURL library and development files.")
46+
endif()
4347
endif()
4448

4549
set(SRCS

0 commit comments

Comments
 (0)