Skip to content

Commit 55a616f

Browse files
jolavilletteclaude
andcommitted
build(cmake): add options to build the GXS Wiki and The Wire services
The CMake build never compiled the experimental GXS "Wiki" (WikiPoos) and "The Wire" services: their sources were commented out in src/CMakeLists.txt and no option defined the RS_USE_WIKI / RS_USE_WIRE macros that gate the service instantiation in rsserver/rsinit.cc and the matching GUI code. As a result the retroshare-gui RS_GXSWIKIPOS / RS_GXSTHEWIRE blocks could not be enabled to a working build. Mirror the qmake "wikipoos" / "gxsthewire" CONFIG switches: - Add RS_GXSWIKIPOS and RS_GXSTHEWIRE options (default OFF, as in qmake). - Compile the p3wiki/p3wire services, rswikiitems/rswireitems and the rswiki.h/rswire.h public headers when the respective option is enabled. - Define RS_USE_WIKI / RS_USE_WIRE PUBLIC so libretroshare consumers see the same guard. Both features stay OFF by default; they are unmaintained and experimental. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ab56561 commit 55a616f

2 files changed

Lines changed: 63 additions & 10 deletions

File tree

CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ option(
118118
"Enable retro-compatibility breaking changes planned for RetroShare 0.7.0"
119119
OFF )
120120

121+
option(
122+
RS_GXSWIKIPOS
123+
"Build the experimental, off-by-default GXS Wiki (WikiPoos) service"
124+
OFF )
125+
126+
option(
127+
RS_GXSTHEWIRE
128+
"Build the experimental, off-by-default GXS 'The Wire' service"
129+
OFF )
130+
121131
option(
122132
RS_LIBRETROSHARE_STANDALONE_INSTALL
123133
"Install libretroshare as a stand-alone library"
@@ -707,6 +717,20 @@ if(RS_GXS_SEND_ALL)
707717
${PROJECT_NAME} PUBLIC RS_GXS_SEND_ALL )
708718
endif(RS_GXS_SEND_ALL)
709719

720+
# Enable the experimental GXS Wiki (WikiPoos) service. The define is PUBLIC so
721+
# that consumers (retroshare-gui, retroshare-service) that link libretroshare
722+
# see the same RS_USE_WIKI guard used in rsserver/rsinit.cc and the GUI.
723+
if(RS_GXSWIKIPOS)
724+
target_compile_definitions(
725+
${PROJECT_NAME} PUBLIC RS_USE_WIKI )
726+
endif(RS_GXSWIKIPOS)
727+
728+
# Enable the experimental GXS 'The Wire' service (see note above).
729+
if(RS_GXSTHEWIRE)
730+
target_compile_definitions(
731+
${PROJECT_NAME} PUBLIC RS_USE_WIRE )
732+
endif(RS_GXSTHEWIRE)
733+
710734
if(RS_BRODCAST_DISCOVERY)
711735
## TODO: upstream option to disable tests building
712736
set(BUILD_EXAMPLE OFF CACHE BOOL "Do not build udp-discovery-cpp examples")

src/CMakeLists.txt

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,8 @@ list(
363363
rsitems/rsrttitems.cc
364364
rsitems/rsserviceinfoitems.cc )
365365

366-
#retroshare/rswiki.h
367-
#./rsitems/rswikiitems.cc
368-
#./rsitems/rswikiitems.h
369-
#./rsitems/rswireitems.h
366+
# NOTE: rswikiitems / rswireitems sources are added further below in the
367+
# services section, guarded by the RS_GXSWIKIPOS / RS_GXSTHEWIRE options.
370368

371369
list(
372370
APPEND RS_SOURCES
@@ -378,8 +376,6 @@ list(
378376
#./rsitems/rsphotoitems.cc
379377
#./rsitems/rsphotoitems.h
380378
#./rsitems/rsposteditems.h
381-
#./rsitems/rswireitems.cc
382-
#retroshare/rswire.h
383379

384380
list(
385381
APPEND RS_SOURCES
@@ -528,10 +524,43 @@ list(
528524
services/p3statusservice.h
529525
services/rseventsservice.h )
530526

531-
#./services/p3wiki.cc
532-
#./services/p3wiki.h
533-
#./services/p3wire.cc
534-
#./services/p3wire.h
527+
# The Wiki (WikiPoos) and The Wire are experimental, off-by-default GXS
528+
# services. Their sources are compiled only when the matching option is set.
529+
# The options live in the top-level CMakeLists.txt (RS_GXSWIKIPOS /
530+
# RS_GXSTHEWIRE), which also adds the RS_USE_WIKI / RS_USE_WIRE compile
531+
# definitions that gate the service instantiation in rsserver/rsinit.cc and
532+
# the corresponding GUI code.
533+
if(RS_GXSWIKIPOS)
534+
list(
535+
APPEND RS_SOURCES
536+
services/p3wiki.cc
537+
rsitems/rswikiitems.cc )
538+
539+
list(
540+
APPEND RS_IMPLEMENTATION_HEADERS
541+
services/p3wiki.h
542+
rsitems/rswikiitems.h )
543+
544+
list(
545+
APPEND RS_PUBLIC_HEADERS
546+
retroshare/rswiki.h )
547+
endif(RS_GXSWIKIPOS)
548+
549+
if(RS_GXSTHEWIRE)
550+
list(
551+
APPEND RS_SOURCES
552+
services/p3wire.cc
553+
rsitems/rswireitems.cc )
554+
555+
list(
556+
APPEND RS_IMPLEMENTATION_HEADERS
557+
services/p3wire.h
558+
rsitems/rswireitems.h )
559+
560+
list(
561+
APPEND RS_PUBLIC_HEADERS
562+
retroshare/rswire.h )
563+
endif(RS_GXSTHEWIRE)
535564

536565
#./services/p3photoservice.cc
537566
#./services/p3photoservice.h

0 commit comments

Comments
 (0)