Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Illuna-Minetest
illuna-minetest
Commits
05b58501
Commit
05b58501
authored
12 years ago
by
sfan5
Committed by
Ilya Zhuravlev
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Tweak CMake files for cURL
parent
29c17c14
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/Modules/FindCURL.cmake
+33
-8
33 additions, 8 deletions
cmake/Modules/FindCURL.cmake
src/CMakeLists.txt
+6
-1
6 additions, 1 deletion
src/CMakeLists.txt
with
39 additions
and
9 deletions
cmake/Modules/FindCURL.cmake
+
33
−
8
View file @
05b58501
...
...
@@ -5,13 +5,38 @@
# CURL_LIBRARY - List of libraries when using curl.
# CURL_FOUND - True if curl found.
# Look for the header file.
FIND_PATH
(
CURL_INCLUDE_DIR NAMES curl/curl.h
)
if
(
UNIX
)
FIND_PATH
(
CURL_INCLUDE_DIR NAMES curl.h
PATHS
/usr/local/include/curl
/usr/include/curl
)
# Look for the library.
FIND_LIBRARY
(
CURL_LIBRARY NAMES curl
)
FIND_LIBRARY
(
CURL_LIBRARY NAMES libcurl.a curl
PATHS
/usr/local/lib
/usr/lib
)
else
(
UNIX
)
FIND_PATH
(
CURL_INCLUDE_DIR NAMES curl/curl.h
)
# Look for the header file.
FIND_LIBRARY
(
CURL_LIBRARY NAMES curl
)
# Look for the library.
INCLUDE
(
FindPackageHandleStandardArgs
)
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR
)
# all listed variables are TRUE
endif
(
UNIX
)
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR
)
if
(
WIN32
)
if
(
CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL
)
# libcurl.dll is required on Windows
SET
(
CURL_FOUND TRUE
)
else
(
CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL
)
SET
(
CURL_FOUND FALSE
)
endif
(
CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL
)
else
(
WIN32
)
if
(
CURL_LIBRARY AND CURL_INCLUDE_DIR
)
SET
(
CURL_FOUND TRUE
)
else
(
CURL_LIBRARY AND CURL_INCLUDE_DIR
)
SET
(
CURL_FOUND FALSE
)
endif
(
CURL_LIBRARY AND CURL_INCLUDE_DIR
)
endif
(
WIN32
)
MESSAGE
(
STATUS
"CURL_INCLUDE_DIR =
${
CURL_INCLUDE_DIR
}
"
)
MESSAGE
(
STATUS
"CURL_LIBRARY =
${
CURL_LIBRARY
}
"
)
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
6
−
1
View file @
05b58501
...
...
@@ -12,7 +12,9 @@ if (NOT ENABLE_CURL)
mark_as_advanced
(
CLEAR CURL_LIBRARY CURL_INCLUDE_DIR
)
endif
(
NOT ENABLE_CURL
)
find_package
(
CURL
)
if
(
ENABLE_CURL
)
find_package
(
CURL
)
endif
(
ENABLE_CURL
)
set
(
USE_CURL 0
)
if
(
CURL_FOUND AND ENABLE_CURL
)
message
(
STATUS
"cURL support enabled"
)
...
...
@@ -436,6 +438,9 @@ if(WIN32)
if
(
VORBISFILE_DLL
)
install
(
FILES
${
VORBISFILE_DLL
}
DESTINATION
${
BINDIR
}
)
endif
()
if
(
CURL_DLL
)
install
(
FILES
${
CURL_DLL
}
DESTINATION
${
BINDIR
}
)
endif
()
endif
()
endif
()
...
...
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