[build] try cmake build fix

Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
r4sas
2026-10-20 02:31:36 +03:00
parent 357fcc14d5
commit db761a5455
2 changed files with 18 additions and 2 deletions
+7 -2
View File
@@ -37,6 +37,7 @@ option(WITH_LIBRARY "Build library" ON)
option(WITH_BINARY "Build binary" ON)
option(WITH_STATIC "Static build" OFF)
option(WITH_UPNP "Include support for UPnP client" OFF)
option(WITH_TORRENTS "Include torrent client" ON)
option(WITH_GIT_VERSION "Use git commit info as version" OFF)
option(WITH_ADDRSANITIZER "Build with address sanitizer unix only" OFF)
option(WITH_THREADSANITIZER "Build with thread sanitizer unix only" OFF)
@@ -147,6 +148,10 @@ if(WITH_UPNP)
add_definitions(-DUSE_UPNP)
endif()
if(NOT WITH_TORRENTS)
add_definitions(-DNO_TORRENTS)
endif()
if(WITH_GIT_VERSION)
include(GetGitRevisionDescription)
git_describe(GIT_VERSION)
@@ -302,11 +307,11 @@ endif()
if(Boost_json_FOUND AND NOT WITH_STATIC)
add_definitions(-DBOOST_JSON_DYN_LINK)
endif()
endif()
if(Boost_url_FOUND AND NOT WITH_STATIC)
add_definitions(-DBOOST_URL_DYN_LINK)
endif()
endif()
find_package(OpenSSL REQUIRED)
if(NOT DEFINED OPENSSL_FOUND)
+11
View File
@@ -27,6 +27,14 @@ BuildRequires: systemd-units
BuildRequires: openssl-devel-engine
%endif
%if 0%{?rhel} <= 9 || 0%{?fedora} <= 43
BuildRequires: boost-json
%endif
%if 0%{?fedora} <= 43
BuildRequires: boost-url
%endif
Requires: logrotate
Requires: systemd
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
@@ -46,6 +54,9 @@ cd build
-DWITH_LIBRARY=OFF \
-DWITH_UPNP=ON \
-DWITH_HARDENING=ON \
%if 0%{?rhel} <= 9
-DWITH_TORRENTS=OFF
%endif
%if 0%{?fedora} > 29
-DBUILD_SHARED_LIBS:BOOL=OFF \
.