ソースを参照

Minor, whitespace edit

Signed-off-by: AMZN-Gene <[email protected]>
AMZN-Gene 1 年間 前
コミット
61326f8ed9
1 ファイル変更0 行追加5 行削除
  1. 0 5
      README.md

+ 0 - 5
README.md

@@ -24,11 +24,9 @@ Some notable examples
 There was problems early on with O3DE 3rdParty libraries. Many 3rdParties used [CMake interface libraries](https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries). The problem is that interfaces can only control their dependencies, not the hierarchy. For example, the O3DE LibTIFF 3rdParty depends on a prebuilt libtiff.a, and libtiff.a depends on ZLib. As an interface, the old LibTIFF used `target_link_libraries` to link in libtiff.a and ZLib. 
 There was problems early on with O3DE 3rdParty libraries. Many 3rdParties used [CMake interface libraries](https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries). The problem is that interfaces can only control their dependencies, not the hierarchy. For example, the O3DE LibTIFF 3rdParty depends on a prebuilt libtiff.a, and libtiff.a depends on ZLib. As an interface, the old LibTIFF used `target_link_libraries` to link in libtiff.a and ZLib. 
 
 
 ```
 ```
-
 add_library(TIFF::TIFF INTERFACE IMPORTED GLOBAL)
 add_library(TIFF::TIFF INTERFACE IMPORTED GLOBAL)
 
 
 target_link_libraries(TIFF::TIFF INTERFACE ZLIB::ZLIB "${TIFF_LIBRARY}")  # No actual dependency between ZLib and TIFF and thus has undefined link order.
 target_link_libraries(TIFF::TIFF INTERFACE ZLIB::ZLIB "${TIFF_LIBRARY}")  # No actual dependency between ZLib and TIFF and thus has undefined link order.
-
 ```
 ```
 
 
 This is a flat dependency list, and so there was no way to tell that libtiff.a depends on ZLib. When CMake generates a Makefile it is free to list those libraries in any order. Depending on the order, libtiff could fail find ZLib definitions. As a result, a program using the LibTIFF 3rdParty would fail to link.
 This is a flat dependency list, and so there was no way to tell that libtiff.a depends on ZLib. When CMake generates a Makefile it is free to list those libraries in any order. Depending on the order, libtiff could fail find ZLib definitions. As a result, a program using the LibTIFF 3rdParty would fail to link.
@@ -45,13 +43,10 @@ Instead of INTERFACE, use whatever library target type has been prebuilt.
 Today's LibTIFF is a proper example of how to declare static library dependencies. The 3rdParty [specifies the path to the library file on disk](https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_LOCATION.html). In this case, 3rdParty::TIFF points to the prebuilt libtiff.a. The 3rdParty, now acting as a wrapper, can tack on dependencies required by the static library.
 Today's LibTIFF is a proper example of how to declare static library dependencies. The 3rdParty [specifies the path to the library file on disk](https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_LOCATION.html). In this case, 3rdParty::TIFF points to the prebuilt libtiff.a. The 3rdParty, now acting as a wrapper, can tack on dependencies required by the static library.
 
 
 ```
 ```
-
 # Add the CMake standard TIFF::TIFF library. It is a static library. 
 # Add the CMake standard TIFF::TIFF library. It is a static library. 
-
 add_library(3rdParty::TIFF STATIC IMPORTED GLOBAL) 
 add_library(3rdParty::TIFF STATIC IMPORTED GLOBAL) 
 
 
 set_target_properties(3rdParty::TIFF PROPERTIES IMPORTED_LOCATION "${TIFF_LIBRARY}") 
 set_target_properties(3rdParty::TIFF PROPERTIES IMPORTED_LOCATION "${TIFF_LIBRARY}") 
 
 
 target_link_libraries(3rdParty::TIFF INTERFACE ZLIB::ZLIB)
 target_link_libraries(3rdParty::TIFF INTERFACE ZLIB::ZLIB)
-
 ```
 ```