f0e72be285
My goal is to reduce our need on sfml_find_package until it can finally be removed. It's preferred to simply use find_package to find 3rd party projects. I had to add IMPORTED targets to some of our find modules so that we could get away from using INTERFACE libraries for external code. That also implied that our find moduels need to be installed so that users have access to them when processing SFML's config module.
24 lines
576 B
CMake
24 lines
576 B
CMake
#
|
|
# Try to find EGL library and include path.
|
|
# Once done this will define
|
|
#
|
|
# DRM_FOUND
|
|
# DRM_INCLUDE_PATH
|
|
# DRM_LIBRARY
|
|
#
|
|
|
|
if(PKG_CONFIG_FOUND)
|
|
pkg_check_modules(PC_DRM drm QUIET)
|
|
endif()
|
|
|
|
find_path(DRM_INCLUDE_DIR NAMES libdrm/drm.h)
|
|
find_library(DRM_LIBRARY NAMES drm)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(DRM DEFAULT_MSG DRM_LIBRARY DRM_INCLUDE_DIR)
|
|
|
|
add_library(DRM::DRM IMPORTED UNKNOWN)
|
|
set_target_properties(DRM::DRM PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES ${DRM_INCLUDE_DIR}/libdrm
|
|
IMPORTED_LOCATION ${DRM_LIBRARY})
|