mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Clean up and tweak build system
* Combine client and server man pages. * Update unit test options and available databases in man page. * Add `--worldname` to man page. * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`. * Disable server build by default on all operating systems. * Make `ENABLE_FREETYPE` not fail if FreeType isn't found. * Enable LevelDB, Redis, and FreeType detection by default. * Remove the `VERSION_PATCH_ORIG` hack. * Add option to search for and use system JSONCPP. * Remove broken LuaJIT version detection. * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`. * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`. * Clean up style of CMake files.
This commit is contained in:
parent
284fefb0c3
commit
93fcab952b
50 changed files with 749 additions and 1068 deletions
|
@ -1,47 +1,19 @@
|
|||
# - Find curl
|
||||
# Find the native CURL headers and libraries.
|
||||
#
|
||||
# CURL_INCLUDE_DIR - where to find curl/curl.h, etc.
|
||||
# CURL_LIBRARY - List of libraries when using curl.
|
||||
# CURL_FOUND - True if curl found.
|
||||
mark_as_advanced(CURL_LIBRARY CURL_INCLUDE_DIR)
|
||||
|
||||
if( UNIX )
|
||||
FIND_PATH(CURL_INCLUDE_DIR NAMES curl.h
|
||||
PATHS
|
||||
/usr/local/include/curl
|
||||
/usr/include/curl
|
||||
)
|
||||
find_library(CURL_LIBRARY NAMES curl)
|
||||
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
|
||||
|
||||
FIND_LIBRARY(CURL_LIBRARY NAMES 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.
|
||||
FIND_FILE(CURL_DLL NAMES libcurl.dll
|
||||
PATHS
|
||||
"c:/windows/system32"
|
||||
DOC "Path of the cURL dll (for installation)")
|
||||
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 )
|
||||
set(CURL_REQUIRED_VARS 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 )
|
||||
if(WIN32)
|
||||
find_file(CURL_DLL NAMES libcurl-4.dll
|
||||
PATHS
|
||||
"C:/Windows/System32"
|
||||
DOC "Path to the cURL DLL (for installation)")
|
||||
mark_as_advanced(CURL_DLL)
|
||||
set(CURL_REQUIRED_VARS ${CURL_REQUIRED_VARS} CURL_DLL)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CURL DEFAULT_MSG ${CURL_REQUIRED_VARS})
|
||||
|
||||
MESSAGE(STATUS "CURL_INCLUDE_DIR = ${CURL_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS "CURL_LIBRARY = ${CURL_LIBRARY}")
|
||||
MESSAGE(STATUS "CURL_DLL = ${CURL_DLL}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue