mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Mir: Get ready for Mir 1.0
Clean up CMake finding and check version. Change last remaining deprecations. Closes #979.
This commit is contained in:
committed by
Camilla Löwy
parent
9f63a8abfa
commit
c9003b5547
@@ -1,37 +1,34 @@
|
||||
# Try to find Mir on a Unix system
|
||||
# FindMir
|
||||
# -------
|
||||
# Finds the Mir library
|
||||
#
|
||||
# This will define:
|
||||
# This will will define the following variables::
|
||||
#
|
||||
# MIR_FOUND - System has Mir
|
||||
# MIR_LIBRARIES - Link these to use Mir
|
||||
# MIR_INCLUDE_DIR - Include directory for Mir
|
||||
# MIR_DEFINITIONS - Compiler switches required for using Mir
|
||||
# MIR_FOUND - the system has Mir
|
||||
# MIR_INCLUDE_DIRS - the Mir include directory
|
||||
# MIR_LIBRARIES - the Mir libraries
|
||||
# MIR_DEFINITIONS - the Mir definitions
|
||||
|
||||
if (NOT WIN32)
|
||||
|
||||
find_package (PkgConfig)
|
||||
pkg_check_modules (PKG_MIR QUIET mirclient)
|
||||
set(MIR_DEFINITIONS ${PKG_MIR_CFLAGS_OTHER})
|
||||
find_package (PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules (PC_MIR mirclient>=0.26.2 QUIET)
|
||||
|
||||
find_path(MIR_INCLUDE_DIR
|
||||
NAMES xkbcommon/xkbcommon.h
|
||||
HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
|
||||
)
|
||||
find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h
|
||||
PATHS ${PC_MIR_INCLUDE_DIRS})
|
||||
|
||||
find_library(MIR_LIBRARY
|
||||
NAMES mirclient
|
||||
HINTS ${PKG_MIR_LIBRARIES} ${MIR_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set (MIR_INCLUDE_DIR ${PKG_MIR_INCLUDE_DIRS})
|
||||
set (MIR_LIBRARIES ${MIR_LIBRARY})
|
||||
find_library(MIR_LIBRARY NAMES mirclient
|
||||
PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS})
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (MIR DEFAULT_MSG
|
||||
MIR_LIBRARIES
|
||||
MIR_INCLUDE_DIR
|
||||
)
|
||||
find_package_handle_standard_args (MIR
|
||||
REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced (MIR_LIBRARIES MIR_INCLUDE_DIR)
|
||||
if (MIR_FOUND)
|
||||
set(MIR_LIBRARIES ${MIR_LIBRARY})
|
||||
set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS})
|
||||
set(MIR_DEFINITIONS -DHAVE_MIR=1)
|
||||
endif()
|
||||
|
||||
endif ()
|
||||
mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user