Author: rinrab
Date: Sat Oct  5 10:32:55 2024
New Revision: 1921130

URL: http://svn.apache.org/viewvc?rev=1921130&view=rev
Log:
cmake: Writing SVN_DSO_SUFFIX_FMT definition to the private config header
instead of compile definitions file, in order to make CMake build more similar
to autoconf build system, which does that.

* CMakeLists.txt
  (dso): Append string with the definition to PRIVATE_CONFIG_DEFINITIONS
   instead of using add_compile_definitions().

Modified:
    subversion/trunk/CMakeLists.txt

Modified: subversion/trunk/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/subversion/trunk/CMakeLists.txt?rev=1921130&r1=1921129&r2=1921130&view=diff
==============================================================================
--- subversion/trunk/CMakeLists.txt (original)
+++ subversion/trunk/CMakeLists.txt Sat Oct  5 10:32:55 2024
@@ -151,7 +151,11 @@ endif()
 
 if(SVN_USE_DSO)
   add_compile_definitions("SVN_USE_DSO")
-  
add_compile_definitions("SVN_DSO_SUFFIX_FMT=\"%%d${CMAKE_SHARED_LIBRARY_SUFFIX}\"")
+  string(APPEND PRIVATE_CONFIG_DEFINITIONS
+    "\n"
+    "/* Shared library file name suffix format */\n"
+    "#define SVN_DSO_SUFFIX_FMT \"%d${CMAKE_SHARED_LIBRARY_SUFFIX}\"\n"
+  )
 endif()
 
 add_compile_definitions("SVN_SOVERSION=1")


Reply via email to