Skip to content

Commit

Permalink
build: Make ra-modules compiling into shared DLL on Windows with CMake.
Browse files Browse the repository at this point in the history
This change will only affect CMake build. gen-win still have the previous
behavior.

* build.conf
  (libsvn_ra): Add explicit dependency on APR-Util; before it was inheriting
   from a ra-module.
  (libsvn_ra_serf, libsvn_ra_svn, libsvn_ra_local): Export required headers
   from the libraries.
* CMakeLists.txt
  (options): Make the shared modules to be shared by default also on Windows.
  (checks): Do not warn if enabled shared modules on Windows.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1920787 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
rinrab committed Sep 19, 2024
1 parent 50d239a commit c630b20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ option(SVN_INSTALL_PRIVATE_H "Instal private header files." OFF)
# Configuration
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
cmake_dependent_option(SVN_BUILD_SHARED_FS "Build shared FS modules" ON "BUILD_SHARED_LIBS" OFF)
cmake_dependent_option(SVN_BUILD_SHARED_RA "Build shared RA modules" ON "BUILD_SHARED_LIBS;LINUX" OFF)
cmake_dependent_option(SVN_BUILD_SHARED_RA "Build shared RA modules" ON "BUILD_SHARED_LIBS" OFF)
option(SVN_DEBUG "Enables specific features for developer builds" OFF)
cmake_dependent_option(SVN_USE_WIN32_CRASHHANDLER "Enables WIN32 crash handler." ON "WIN32" OFF)
option(SVN_USE_DSO "Defined if svn should try to load DSOs" OFF)
Expand Down Expand Up @@ -162,10 +162,6 @@ else()
set(SVN_RA_BUILD_TYPE STATIC)
endif()

if(SVN_BUILD_SHARED_RA AND WIN32)
message(FATAL_ERROR "SVN_BUILD_SHARED_RA not yet supported on Windows")
endif()

if(SVN_ENABLE_FS_BASE)
message(FATAL_ERROR "SVN_ENABLE_FS_BASE is NOT implemented and deprecated.")
endif()
Expand Down
5 changes: 4 additions & 1 deletion build.conf
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ msvc-export = private/svn_fs_util.h
description = Subversion General Repository Access Library
type = lib
path = subversion/libsvn_ra
libs = libsvn_delta libsvn_subr ra-libs apriconv apr
libs = libsvn_delta libsvn_subr ra-libs apriconv apr aprutil
# conditionally add more dependencies
add-deps = $(SVN_RA_LIB_DEPS)
add-install-deps = $(SVN_RA_LIB_INSTALL_DEPS)
Expand All @@ -355,6 +355,7 @@ install = serf-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr serf zlib
add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
msvc-static = yes
msvc-export = ../libsvn_ra_serf/ra_init.h

# Accessing repositories via SVN
[libsvn_ra_svn]
Expand All @@ -364,6 +365,7 @@ path = subversion/libsvn_ra_svn
install = ramod-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr sasl
msvc-static = yes
msvc-export = ../libsvn_ra_svn/ra_init.h svn_ra_svn.h private/svn_ra_svn_private.h

# Accessing repositories via direct libsvn_fs
[libsvn_ra_local]
Expand All @@ -373,6 +375,7 @@ path = subversion/libsvn_ra_local
install = ramod-lib
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
msvc-static = yes
msvc-export = ../libsvn_ra_local/ra_init.h

# Routines built on top of libsvn_fs
[libsvn_repos]
Expand Down

0 comments on commit c630b20

Please sign in to comment.