freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] CMakeLists.txt: Provide both 'freetype'


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] CMakeLists.txt: Provide both 'freetype' and 'Freetype::Freetype' targets.
Date: Sun, 03 Jul 2022 04:49:41 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

  • 55a97b0c
    by Thomas Sondergaard at 2022-07-03T06:48:15+02:00
    CMakeLists.txt: Provide both 'freetype' and 'Freetype::Freetype' targets.
    
    FreeType can be located by consuming projects that use
    `find_package(Freetype)` either via the old `MODULE` path (which uses
    `FindFreetype.cmake` supplied by CMake), or via the new `CONFIG` path (which
    uses `freetype-config.cmake` as supplied by this project).  Up to this point
    the CMake module has supplied the target `Freetype::Freetype` and the config
    file provided by this project the target `freetype`.  Now we supply both
    `freetype` and `Freetype::Freetype` so that consuming projects can always
    use the target `Freetype::Freetype` regardless of what path was taken by
    `find_package(Freetype)`.
    
    Fixes #1165.
    

1 changed file:

Changes:

  • CMakeLists.txt
    ... ... @@ -498,6 +498,13 @@ if (BUILD_FRAMEWORK)
    498 498
       )
    
    499 499
     endif ()
    
    500 500
     
    
    501
    +# 'freetype-interface' is an interface library, to be accessed with
    
    502
    +# `EXPORT_NAME Freetype::Freetype`.  This is the target name provided by
    
    503
    +# CMake's `FindFreetype.cmake`, so we provide it for compatibility.
    
    504
    +add_library(freetype-interface INTERFACE)
    
    505
    +set_target_properties(freetype-interface PROPERTIES
    
    506
    +  EXPORT_NAME Freetype::Freetype
    
    507
    +  INTERFACE_LINK_LIBRARIES freetype)
    
    501 508
     
    
    502 509
     set(PKGCONFIG_REQUIRES "")
    
    503 510
     set(PKGCONFIG_REQUIRES_PRIVATE "")
    
    ... ... @@ -615,7 +622,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
    615 622
         COMPATIBILITY SameMajorVersion)
    
    616 623
     
    
    617 624
       install(
    
    618
    -    TARGETS freetype
    
    625
    +    TARGETS freetype freetype-interface
    
    619 626
           EXPORT freetype-targets
    
    620 627
           LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    
    621 628
           ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]