Преглед изворни кода

docs: document copying shared SDL3 a bit more + document sanitizer/libc incompatibility

Anonymous Maarten пре 9 месеци
родитељ
комит
1647d36aec
2 измењених фајлова са 14 додато и 5 уклоњено
  1. 14 2
      docs/README-cmake.md
  2. 0 3
      docs/README-git.md

+ 14 - 2
docs/README-cmake.md

@@ -297,6 +297,13 @@ At the end of SDL CMake configuration, a table shows all CMake options along wit
 | `-DSDL_DISABLE_INSTALL_DOCS=` | `ON`/`OFF`   | Don't install the SDL documentation                                                                 |
 | `-DSDL_DISABLE_INSTALL_DOCS=` | `ON`/`OFF`   | Don't install the SDL documentation                                                                 |
 | `-DSDL_INSTALL_TESTS=`        | `ON`/`OFF`   | Install the SDL test programs                                                                       |
 | `-DSDL_INSTALL_TESTS=`        | `ON`/`OFF`   | Install the SDL test programs                                                                       |
 
 
+### Incompatibilities
+
+#### `SDL_LIBC=OFF` and sanitizers
+
+Building with `-DSDL_LIBC=OFF` will make it impossible to use the sanitizer, such as the address sanitizer. 
+Configure your project with `-DSDL_LIBC=ON` to make use of sanitizers.
+
 ## CMake FAQ
 ## CMake FAQ
 
 
 ### How do I copy a SDL3 dynamic library to another location?
 ### How do I copy a SDL3 dynamic library to another location?
@@ -304,8 +311,7 @@ At the end of SDL CMake configuration, a table shows all CMake options along wit
 Use [CMake generator expressions](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#target-dependent-expressions).
 Use [CMake generator expressions](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#target-dependent-expressions).
 Generator expressions support multiple configurations, and are evaluated during build system generation time.
 Generator expressions support multiple configurations, and are evaluated during build system generation time.
 
 
-On Windows, the following example this copies `SDL3.dll` to the directory where `mygame.exe` is built.
-On Unix systems, `$<TARGET_FILE:...>` will refer to the dynamic library (or framework).
+On Windows, the following example copies `SDL3.dll` to the directory where `mygame.exe` is built.
 ```cmake
 ```cmake
 if(WIN32)
 if(WIN32)
     add_custom_command(
     add_custom_command(
@@ -315,6 +321,12 @@ if(WIN32)
     )
     )
 endif()
 endif()
 ```
 ```
+On Unix systems, `$<TARGET_FILE:...>` will refer to the dynamic library (or framework),
+and you might need to use `$<TARGET_SONAME_FILE:tgt>` instead.
+
+Most often, you can avoid copying libraries by configuring your project with absolute [`CMAKE_LIBRARY_OUTPUT_DIRECTORY`](https://cmake.org/cmake/help/latest/variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY.html)
+and [`CMAKE_RUNTIME_OUTPUT_DIRECTORY`](https://cmake.org/cmake/help/latest/variable/CMAKE_RUNTIME_OUTPUT_DIRECTORY.html) paths.
+When using a multi-config generator (such as Visual Studio or Ninja Multi-Config), eventually add `/$<CONFIG>` to both paths.
 
 
 ### Linking against a static SDL library fails due to relocation errors
 ### Linking against a static SDL library fails due to relocation errors
 
 

+ 0 - 3
docs/README-git.md

@@ -11,9 +11,6 @@ macOS, Windows, and Unix systems.
 
 
     git clone https://github.com/libsdl-org/SDL
     git clone https://github.com/libsdl-org/SDL
 
 
-If you are building SDL via configure, you will need to run autogen.sh
-before running configure.
-
 There is a web interface to the Git repository at:
 There is a web interface to the Git repository at:
 	http://github.com/libsdl-org/SDL/
 	http://github.com/libsdl-org/SDL/