Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
42c9b119
There was an error fetching the commit references. Please try again later.
Commit
42c9b119
authored
13 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
ENH: improve ImportCurl, avoid multiple find_package
parent
4d62f136
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMake/ImportCurl.cmake
+9
-22
9 additions, 22 deletions
CMake/ImportCurl.cmake
with
9 additions
and
22 deletions
CMake/ImportCurl.cmake
+
9
−
22
View file @
42c9b119
...
...
@@ -8,31 +8,18 @@ ENDIF(CURL_FOUND)
MARK_AS_ADVANCED
(
OTB_USE_CURL
)
IF
(
OTB_USE_CURL
)
FIND_PATH
(
CURL_INCLUDE_DIR NAMES curl/curl.h PATHS
${
OSGEO4W_INCLUDE
}
)
MARK_AS_ADVANCED
(
CURL_INCLUDE_DIR
)
IF
(
NOT CURL_INCLUDE_DIR
)
MESSAGE
(
FATAL_ERROR
"Cannot find CURL include directory. Please set CURL_INCLUDE_DIR or SET OTB_USE_CURL OFF."
)
ENDIF
(
NOT CURL_INCLUDE_DIR
)
FIND_LIBRARY
(
CURL_LIBRARY NAMES curl libcurl_imp PATHS
${
OSGEO4W_LIB
}
)
MARK_AS_ADVANCED
(
CURL_LIBRARY
)
IF
(
NOT CURL_LIBRARY
)
MESSAGE
(
FATAL_ERROR
"Cannot find CURL library. Please set CURL_LIBRARY or SET OTB_USE_CURL OFF."
)
ENDIF
(
NOT CURL_LIBRARY
)
TRY_COMPILE
(
OTB_CURL_MULTI_AVAILABLE
IF
(
CURL_FOUND
)
MESSAGE
(
STATUS
"Using CURL external version"
)
TRY_COMPILE
(
OTB_CURL_MULTI_AVAILABLE
${
CMAKE_CURRENT_BINARY_DIR
}
/CMake
${
CMAKE_CURRENT_SOURCE_DIR
}
/CMake/TestCurlMulti.cxx
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:PATH=
${
CURL_INCLUDE_DIR
}
"
"-DLINK_LIBRARIES:STRING=
${
CURL_LIBRAR
Y
}
"
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:PATH=
${
CURL_INCLUDE_DIR
S
}
"
"-DLINK_LIBRARIES:STRING=
${
CURL_LIBRAR
IES
}
"
OUTPUT_VARIABLE OUTPUT
)
MESSAGE
(
STATUS
" Enabling Curl support"
)
MESSAGE
(
STATUS
" Curl includes :
${
CURL_INCLUDE_DIR
}
"
)
MESSAGE
(
STATUS
" Curl library :
${
CURL_LIBRARY
}
"
)
ELSE
(
CURL_FOUND
)
MESSAGE
(
FATAL_ERROR
"CURL required but not found. "
"Turn OTB_USE_CURL to OFF to disable CURL support"
)
ENDIF
(
CURL_FOUND
)
ELSE
(
OTB_USE_CURL
)
MESSAGE
(
STATUS
" Disabling Curl support"
)
ENDIF
(
OTB_USE_CURL
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment