Warning, /geant4/cmake/Modules/G4FreetypeShim.cmake is written in an unsupported language. File is not indexed.
0001 # - G4FreetypeShim
0002 #
0003 # Geant4's Geant4Config.cmake file aims to support CMake 3.8 and newer
0004 # The Freetype dependency is located through CMake's builtin FindFreetype
0005 # module and linked through the Freetype::Freetype imported target.
0006 # This target is however only available from CMake 3.10, so recreate
0007 # Freetype::Freetype target if it does not exist
0008 if(Freetype_FOUND)
0009 if(NOT TARGET Freetype::Freetype)
0010 add_library(Freetype::Freetype UNKNOWN IMPORTED)
0011 set_target_properties(Freetype::Freetype PROPERTIES
0012 INTERFACE_INCLUDE_DIRECTORIES "${FREETYPE_INCLUDE_DIRS}")
0013
0014 if(FREETYPE_LIBRARY_RELEASE)
0015 set_property(TARGET Freetype::Freetype APPEND PROPERTY
0016 IMPORTED_CONFIGURATIONS RELEASE)
0017 set_target_properties(Freetype::Freetype PROPERTIES
0018 IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
0019 IMPORTED_LOCATION_RELEASE "${FREETYPE_LIBRARY_RELEASE}")
0020 endif()
0021
0022 if(FREETYPE_LIBRARY_DEBUG)
0023 set_property(TARGET Freetype::Freetype APPEND PROPERTY
0024 IMPORTED_CONFIGURATIONS DEBUG)
0025 set_target_properties(Freetype::Freetype PROPERTIES
0026 IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
0027 IMPORTED_LOCATION_DEBUG "${FREETYPE_LIBRARY_DEBUG}")
0028 endif()
0029
0030 if(NOT FREETYPE_LIBRARY_RELEASE AND NOT FREETYPE_LIBRARY_DEBUG)
0031 set_target_properties(Freetype::Freetype PROPERTIES
0032 IMPORTED_LINK_INTERFACE_LANGUAGES "C"
0033 IMPORTED_LOCATION "${FREETYPE_LIBRARY}")
0034 endif()
0035 endif()
0036 endif()
0037