mirror of https://github.com/stenzek/duckstation
				
				
				
			NoGUI: Build fix
							parent
							
								
									6fd7eda68f
								
							
						
					
					
						commit
						fb659d817e
					
				@ -1,29 +0,0 @@
 | 
				
			|||||||
# from https://github.com/glfw/glfw/blob/master/CMake/modules/FindWaylandProtocols.cmake
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
find_package(PkgConfig)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
 | 
					 | 
				
			||||||
                OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR
 | 
					 | 
				
			||||||
                RESULT_VARIABLE _pkgconfig_failed)
 | 
					 | 
				
			||||||
if (_pkgconfig_failed)
 | 
					 | 
				
			||||||
    message(FATAL_ERROR "Missing wayland-protocols pkgdatadir")
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
find_package_handle_standard_args(WaylandProtocols
 | 
					 | 
				
			||||||
    FOUND_VAR
 | 
					 | 
				
			||||||
        WaylandProtocols_FOUND
 | 
					 | 
				
			||||||
    REQUIRED_VARS
 | 
					 | 
				
			||||||
        WaylandProtocols_PKGDATADIR
 | 
					 | 
				
			||||||
    VERSION_VAR
 | 
					 | 
				
			||||||
        WaylandProtocols_VERSION
 | 
					 | 
				
			||||||
    HANDLE_COMPONENTS
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND})
 | 
					 | 
				
			||||||
set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR})
 | 
					 | 
				
			||||||
set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@ -1,38 +0,0 @@
 | 
				
			|||||||
# - Try to find XKBCommon
 | 
					 | 
				
			||||||
# Once done, this will define
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   XKBCOMMON_FOUND - System has XKBCommon
 | 
					 | 
				
			||||||
#   XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
 | 
					 | 
				
			||||||
#   XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
 | 
					 | 
				
			||||||
#   XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
find_package(PkgConfig)
 | 
					 | 
				
			||||||
pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
 | 
					 | 
				
			||||||
set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
find_path(XKBCOMMON_INCLUDE_DIR
 | 
					 | 
				
			||||||
    NAMES xkbcommon/xkbcommon.h
 | 
					 | 
				
			||||||
    HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
find_library(XKBCOMMON_LIBRARY
 | 
					 | 
				
			||||||
    NAMES xkbcommon
 | 
					 | 
				
			||||||
    HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
 | 
					 | 
				
			||||||
set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})
 | 
					 | 
				
			||||||
set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
include(FindPackageHandleStandardArgs)
 | 
					 | 
				
			||||||
find_package_handle_standard_args(XKBCommon DEFAULT_MSG
 | 
					 | 
				
			||||||
    XKBCOMMON_LIBRARY
 | 
					 | 
				
			||||||
    XKBCOMMON_INCLUDE_DIR
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if (XKBCOMMON_INCLUDE_DIR AND XKBCOMMON_LIBRARY AND NOT TARGET XKBCommon::XKBCommon)
 | 
					 | 
				
			||||||
    add_library(XKBCommon::XKBCommon UNKNOWN IMPORTED)
 | 
					 | 
				
			||||||
    set_target_properties(XKBCommon::XKBCommon PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${XKBCOMMON_INCLUDE_DIR}" IMPORTED_LOCATION "${XKBCOMMON_LIBRARY}")
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue