-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[civetweb] download instead of bundle, bump from 1.15 to 1.16, and define proper CMake target #21947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ferdymercury
wants to merge
42
commits into
root-project:master
Choose a base branch
from
ferdymercury:bcivet
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[civetweb] download instead of bundle, bump from 1.15 to 1.16, and define proper CMake target #21947
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
efd4873
[civetweb] download instead of bundle and define proper CMake target,…
ferdymercury cf1f190
[ci] explicit enable in alma10clang-ninja even if it was getting on i…
ferdymercury c7c0d98
todo list
ferdymercury 121609e
fixes for SSL
ferdymercury 9ff465c
fixes for SSL
ferdymercury 4a93fad
cleanup
ferdymercury dea5093
simplify
ferdymercury 10c4597
try with installDir
ferdymercury 6392161
fix asan
ferdymercury b3e2192
fix default
ferdymercury 0f6fcf7
mention deprecation
ferdymercury a61b567
try fix path
ferdymercury ccd8afe
disable SSL dynamic loading
ferdymercury bd278c2
Update CMakeLists.txt
ferdymercury 3dc00cc
fix openssl include
ferdymercury f525ece
fix typo
ferdymercury 6ea0fba
fix builtin ssl name
ferdymercury 3386bb7
fix builtin name
ferdymercury 298da91
rename builtin name
ferdymercury 4956d2e
try fix openssl mac include not found
ferdymercury 6b416b0
Update CMakeLists.txt
ferdymercury 555122f
Update cmake/modules/SearchInstalledSoftware.cmake
ferdymercury ec00267
Apply suggestion from @ferdymercury
ferdymercury cac7bcb
print some debug info
ferdymercury 1a28bd7
try more debugging
ferdymercury 51ba508
another attempt
ferdymercury 2c64c55
avoid cache vars
ferdymercury 1b42435
fix typo
ferdymercury 983e87d
more
ferdymercury 6beef07
verbose
ferdymercury 092898f
vninja
ferdymercury ed31ea9
crypto
ferdymercury df80456
more mssges
ferdymercury 7462e8a
fix
ferdymercury 52491df
Update CMakeLists.txt
ferdymercury 0b4c568
Update CMakeLists.txt
ferdymercury f8a082e
Update CMakeLists.txt
ferdymercury 58f5ca7
Update CMakeLists.txt
ferdymercury d41c730
print headers
ferdymercury 8c2e48c
Update 0001-message-libs.patch
ferdymercury c5b859a
Update CMakeLists.txt
ferdymercury be0cde1
undo
ferdymercury File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
.github/workflows/root-ci-config/buildconfig/alma10-clang_ninja.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| # Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. | ||
| # All rights reserved. | ||
| # | ||
| # For the licensing terms see $ROOTSYS/LICENSE. | ||
| # For the list of contributors see $ROOTSYS/README/CREDITS. | ||
|
|
||
| # **PLEASE UPDATE ALSO THE FOLLOWING LINE WHEN UPDATING THE VERSION** | ||
| # 10 Apr 2023, https://github.com/civetweb/civetweb/releases/tag/v1.16 | ||
| set(ROOT_CIVETWEB_VERSION 1.16) | ||
| set(ROOT_CIVETWEB_HASH "f0e471c1bf4e7804a6cfb41ea9d13e7d623b2bcc7bc1e2a4dd54951a24d60285") | ||
| set(ROOT_CIVETWEB_PREFIX ${CMAKE_BINARY_DIR}/builtins/CIVETWEB-prefix) | ||
| set(ROOT_CIVETWEB_LIBRARY ${ROOT_CIVETWEB_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}civetweb${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
|
|
||
| if (NOT DEFINED GIT_EXECUTABLE) | ||
| set(GIT_EXECUTABLE "git") | ||
| endif() | ||
|
|
||
| include(ExternalProject) | ||
|
|
||
| # Clear cache variables set by find_package(CIVETWEB) | ||
| # to ensure that we use the builtin version | ||
| foreach(var CIVETWEB_LIBRARIES CIVETWEB_LIBRARY CIVETWEB_LIBRARY_DEBUG CIVETWEB_LIBRARY_RELEASE CIVETWEB_FOUND CIVETWEB_VERSION CIVETWEB_INCLUDE_DIR CIVETWEB_LIBRARY CIVETWEB_LIBRARIES) | ||
| unset(${var}) | ||
| unset(${var} CACHE) | ||
| endforeach() | ||
|
|
||
| if(WIN32 AND NOT CMAKE_GENERATOR MATCHES Ninja) | ||
| if(winrtdebug) | ||
| set(ROOT_CIVETWEB_BUILD_COMMAND_FLAGS "--config Debug") | ||
| else() | ||
| set(ROOT_CIVETWEB_BUILD_COMMAND_FLAGS "--config $<IF:$<CONFIG:Debug,RelWithDebInfo>,RelWithDebInfo,Release>") | ||
| endif() | ||
| endif() | ||
|
|
||
| if(ssl) | ||
| if(OPENSSL_VERSION) | ||
| string(REPLACE "." ";" lst ${OPENSSL_VERSION}) | ||
| list(GET lst 0 ssl_major) | ||
| list(GET lst 1 ssl_minor) | ||
| else() | ||
| MESSAGE(SEND_ERROR "No openSSL version defined.") | ||
| endif() | ||
|
|
||
| if((${ssl_major} EQUAL "1") AND (${ssl_minor} EQUAL "1")) | ||
| MESSAGE(STATUS "Use SSL API VERSION 1.1 for civetweb") | ||
| set(ROOT_SSL_API "-DCIVETWEB_SSL_OPENSSL_API_1_1=ON" "-DCIVETWEB_SSL_OPENSSL_API_3_0=OFF" "-DCIVETWEB_SSL_OPENSSL_API_1_0=OFF" "-DCIVETWEB_ENABLE_SSL=ON") | ||
| elseif((${ssl_major} EQUAL "3")) | ||
| MESSAGE(STATUS "Use SSL API VERSION 3.${ssl_minor} for civetweb") | ||
| set(ROOT_SSL_API "-DCIVETWEB_SSL_OPENSSL_API_3_0=ON" "-DCIVETWEB_SSL_OPENSSL_API_1_1=OFF" "-DCIVETWEB_SSL_OPENSSL_API_1_0=OFF" "-DCIVETWEB_ENABLE_SSL=ON") | ||
| elseif((${ssl_major} EQUAL "1") AND (${ssl_minor} EQUAL "0")) | ||
| MESSAGE(STATUS "Use SSL API VERSION 1.0 for civetweb") | ||
| set(ROOT_SSL_API "-DCIVETWEB_SSL_OPENSSL_API_1_0=ON" "-DCIVETWEB_SSL_OPENSSL_API_3_0=OFF" "-DCIVETWEB_SSL_OPENSSL_API_1_1=OFF" "-DCIVETWEB_ENABLE_SSL=ON") | ||
| else() | ||
| MESSAGE(WARNING "Not able to recognize SSL version ${OPENSSL_VERSION}, disable SSL") | ||
| set(ROOT_SSL_API "-DCIVETWEB_ENABLE_SSL=OFF") | ||
| endif() | ||
| else() | ||
| set(ROOT_SSL_API "-DCIVETWEB_ENABLE_SSL=OFF") | ||
| endif() | ||
| if(NOT MSVC) | ||
| set(ROOT_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_X_DOM_SOCKET") | ||
| else() | ||
| set(ROOT_C_FLAGS ${CMAKE_C_FLAGS}) | ||
| endif() | ||
| if (CMAKE_OSX_SYSROOT) | ||
| set(ROOT_C_FLAGS "${ROOT_C_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}") | ||
| endif() | ||
|
|
||
| ExternalProject_Add(BUILTIN_CIVETWEB | ||
| PREFIX ${ROOT_CIVETWEB_PREFIX} | ||
| # URL ${lcgpackages}/civetweb-${ROOT_CIVETWEB_VERSION}.tar.gz | ||
| URL https://github.com/civetweb/civetweb/archive/refs/tags/v${ROOT_CIVETWEB_VERSION}.tar.gz # TODO move to LCG | ||
| URL_HASH SHA256=${ROOT_CIVETWEB_HASH} | ||
|
|
||
| LOG_DOWNLOAD TRUE | ||
| LOG_CONFIGURE FALSE | ||
| LOG_BUILD FALSE | ||
| LOG_INSTALL FALSE | ||
| LOG_OUTPUT_ON_FAILURE FALSE | ||
| USES_TERMINAL_DOWNLOAD true | ||
| USES_TERMINAL_UPDATE true | ||
| USES_TERMINAL_BUILD true | ||
| USES_TERMINAL_INSTALL true | ||
| USES_TERMINAL_TEST true | ||
| INSTALL_DIR ${ROOT_CIVETWEB_PREFIX} | ||
| CMAKE_ARGS -G ${CMAKE_GENERATOR} | ||
| -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> | ||
| -DCMAKE_INSTALL_LIBDIR:PATH=<INSTALL_DIR>/lib | ||
| -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} | ||
| -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | ||
| -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||
| -DCMAKE_C_FLAGS=${ROOT_C_FLAGS} | ||
| -DCMAKE_CXX_FLAGS=${ROOT_EXTERNAL_CXX_FLAGS} | ||
| -DBUILD_SHARED_LIBS:BOOL=FALSE | ||
| -DBUILD_TESTING=FALSE | ||
| -DCIVETWEB_ENABLE_ASAN=OFF # If set to ON, you need to set below link_library interface to UBSAN libs | ||
| -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF # If set to ON, you need to set below link_library interface to CMAKE_DL_LIBS | ||
| -DCIVETWEB_BUILD_TESTING=FALSE | ||
| -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE | ||
| -DCMAKE_POLICY_VERSION_MINIMUM=3.5 | ||
| -DCIVETWEB_ENABLE_WEBSOCKETS=ON | ||
| -DOPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} | ||
| #-DOPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY} | ||
| #-DOPENSSL_SSL_LIBRARY=${OPENSSL_SSL_LIBRARY} | ||
| -DOPENSSL_LIBRARIES=${OPENSSL_LIBRARIES} | ||
| #-DCMAKE_PREFIX_PATH:STRING=${OPENSSL_PREFIX} | ||
| #-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} | ||
| #-DOPENSSL_FOUND=TRUE | ||
| #-DOpenSSL_FOUND=TRUE | ||
| #-DOpenSSL_ROOT=${OPENSSL_ROOT} #For CMake <3.27 | ||
| #-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} | ||
| #-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} | ||
| # -DCMAKE_INSTALL_RPATH:STRING=${rpath_origin} | ||
| ${ROOT_SSL_API} | ||
| BUILD_COMMAND ${CMAKE_COMMAND} --build . ${ROOT_CIVETWEB_BUILD_COMMAND_FLAGS} | ||
| INSTALL_COMMAND ${CMAKE_COMMAND} --build . ${ROOT_CIVETWEB_BUILD_COMMAND_FLAGS} --target install | ||
| BUILD_BYPRODUCTS | ||
| ${ROOT_CIVETWEB_LIBRARY} | ||
| TIMEOUT 600 | ||
| ) | ||
|
|
||
| file(MAKE_DIRECTORY ${ROOT_CIVETWEB_PREFIX}/include) | ||
| add_library(civetweb::civetweb IMPORTED STATIC GLOBAL) | ||
| add_dependencies(civetweb::civetweb BUILTIN_CIVETWEB) | ||
| if(builtin_openssl) | ||
| add_dependencies(BUILTIN_CIVETWEB BUILTIN_OPENSSL) | ||
| endif() | ||
| set_target_properties(civetweb::civetweb PROPERTIES | ||
| IMPORTED_LOCATION ${ROOT_CIVETWEB_LIBRARY} | ||
| INTERFACE_INCLUDE_DIRECTORIES ${ROOT_CIVETWEB_PREFIX}/include) | ||
| target_compile_definitions(civetweb::civetweb INTERFACE CIVETWEB_LIBRARY_STATIC) # needed for Win32 since public flag is not correctly propagated to parent scope (BUILD_SHARED_LIBS works fine for building but when installing, flag info is lost) | ||
| if (ssl) | ||
| target_link_libraries(civetweb::civetweb INTERFACE OpenSSL::SSL) | ||
| endif() | ||
|
|
||
| # Set the canonical output of find_package according to | ||
| # https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#standard-variable-names | ||
| set(civetweb_INCLUDE_DIRS ${ROOT_CIVETWEB_PREFIX}/include PARENT_SCOPE) | ||
| set(civetweb_LIBRARIES ${ROOT_CIVETWEB_LIBRARY} PARENT_SCOPE) | ||
| set(civetweb_FOUND TRUE PARENT_SCOPE) | ||
| set(civetweb_VERSION ${ROOT_CIVETWEB_VERSION} PARENT_SCOPE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TO-DO investigate