mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 01:33:53 +00:00
Add HTTPLIB_INSTALL CMake option (#1575)
* Add HTTPLIB_INSTALL CMake option * Proper formatting of HTTPLIB_INSTALL block Co-authored-by: Jiwoo Park <jiwoo_90@naver.com> --------- Co-authored-by: Niccolò Iardella <niccolo.iardella@doriansrl.it> Co-authored-by: Jiwoo Park <jiwoo_90@naver.com>
This commit is contained in:
parent
3409c00e6f
commit
c54c71a3e5
@ -9,6 +9,7 @@
|
|||||||
* HTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN (default on)
|
* HTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN (default on)
|
||||||
* HTTPLIB_REQUIRE_BROTLI (default off)
|
* HTTPLIB_REQUIRE_BROTLI (default off)
|
||||||
* HTTPLIB_COMPILE (default off)
|
* HTTPLIB_COMPILE (default off)
|
||||||
|
* HTTPLIB_INSTALL (default on)
|
||||||
* HTTPLIB_TEST (default off)
|
* HTTPLIB_TEST (default off)
|
||||||
* BROTLI_USE_STATIC_LIBS - tells Cmake to use the static Brotli libs (only works if you have them installed).
|
* BROTLI_USE_STATIC_LIBS - tells Cmake to use the static Brotli libs (only works if you have them installed).
|
||||||
* OPENSSL_USE_STATIC_LIBS - tells Cmake to use the static OpenSSL libs (only works if you have them installed).
|
* OPENSSL_USE_STATIC_LIBS - tells Cmake to use the static OpenSSL libs (only works if you have them installed).
|
||||||
@ -87,6 +88,8 @@ option(HTTPLIB_USE_OPENSSL_IF_AVAILABLE "Uses OpenSSL (if available) to enable H
|
|||||||
option(HTTPLIB_USE_ZLIB_IF_AVAILABLE "Uses ZLIB (if available) to enable Zlib compression support." ON)
|
option(HTTPLIB_USE_ZLIB_IF_AVAILABLE "Uses ZLIB (if available) to enable Zlib compression support." ON)
|
||||||
# Lets you compile the program as a regular library instead of header-only
|
# Lets you compile the program as a regular library instead of header-only
|
||||||
option(HTTPLIB_COMPILE "If ON, uses a Python script to split the header into a compilable header & source file (requires Python v3)." OFF)
|
option(HTTPLIB_COMPILE "If ON, uses a Python script to split the header into a compilable header & source file (requires Python v3)." OFF)
|
||||||
|
# Lets you disable the installation (useful when fetched from another CMake project)
|
||||||
|
option(HTTPLIB_INSTALL "Enables the installation target" ON)
|
||||||
# Just setting this variable here for people building in-tree
|
# Just setting this variable here for people building in-tree
|
||||||
if(HTTPLIB_COMPILE)
|
if(HTTPLIB_COMPILE)
|
||||||
set(HTTPLIB_IS_COMPILED TRUE)
|
set(HTTPLIB_IS_COMPILED TRUE)
|
||||||
@ -262,6 +265,7 @@ else()
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(HTTPLIB_INSTALL)
|
||||||
# Creates the export httplibTargets.cmake
|
# Creates the export httplibTargets.cmake
|
||||||
# This is strictly what holds compilation requirements
|
# This is strictly what holds compilation requirements
|
||||||
# and linkage information (doesn't find deps though).
|
# and linkage information (doesn't find deps though).
|
||||||
@ -287,6 +291,7 @@ install(EXPORT httplibTargets
|
|||||||
NAMESPACE ${PROJECT_NAME}::
|
NAMESPACE ${PROJECT_NAME}::
|
||||||
DESTINATION ${_TARGET_INSTALL_CMAKEDIR}
|
DESTINATION ${_TARGET_INSTALL_CMAKEDIR}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(HTTPLIB_TEST)
|
if(HTTPLIB_TEST)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user