Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Kieltux:branches:games:tools
lgogdownloader
lgogdownloader-fix-finding-libtitdy.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lgogdownloader-fix-finding-libtitdy.patch of Package lgogdownloader
diff -Nur lgogdownloader-3.14-orig/cmake/FindTidy.cmake lgogdownloader-3.14/cmake/FindTidy.cmake --- lgogdownloader-3.14-orig/cmake/FindTidy.cmake 2024-06-04 16:24:33.000000000 +0200 +++ lgogdownloader-3.14/cmake/FindTidy.cmake 2024-06-05 18:18:33.953612930 +0200 @@ -1,35 +1,134 @@ -# - Try to find tidy -# +# Find Tidy +# Find the native TIDY includes and library. # Once done this will define -# Tidy_FOUND - System has tidy -# Tidy_INCLUDE_DIRS - The tidy include directories -# Tidy_LIBRARIES - The libraries needed to use tidy - -find_package(PkgConfig) -pkg_check_modules(PC_TIDY tidy REQUIRED) - -find_path(TIDY_INCLUDE_DIR tidy.h - HINTS - ${PC_TIDY_INCLUDEDIR} - ${PC_TIDY_INCLUDE_DIRS} - PATH_SUFFIXES - tidy - PATHS - ${PC_TIDY_INCLUDE_DIRS} - ) - -find_library(TIDY_LIBRARY tidy - HINTS - ${PC_TIDY_LIBDIR} - ${PC_TIDY_LIBRARY_DIRS} - PATHS - ${PC_TIDY_LIBRARY_DIRS} - ) - -mark_as_advanced(TIDY_INCLUDE_DIR TIDY_LIBRARY) - -if(TIDY_INCLUDE_DIR) - set(Tidy_FOUND ON) - set(Tidy_INCLUDE_DIRS ${TIDY_INCLUDE_DIR}) - set(Tidy_LIBRARIES ${TIDY_LIBRARY}) -endif(TIDY_INCLUDE_DIR) +# +# TIDY_FOUND - True if tidy found. +# TIDY_INCLUDE_DIRS - where to find tidy.h, etc. +# TIDY_LIBRARIES - List of libraries when using tidy. +# +# An includer may set TIDY_ROOT to a Tidy installation root to tell +# this module where to look. +# +# 20180118 - Remove 'tidy5' name, AND 'include/tidy' subdirectory +# + +#set(_TIDY_SEARCHES ${CMAKE_INSTALL_PREFIX}) + +# Search TIDY_ROOT first if it is set. +if (TIDY_ROOT) + set(_TIDY_SEARCH_ROOT PATHS ${TIDY_ROOT}) + list(APPEND _TIDY_SEARCHES ${_TIDY_SEARCH_ROOT}) +endif() +set( _TIDY_ROOT $ENV{TIDY_ROOT} ) +if (_TIDY_ROOT) + list(APPEND _TIDY_SEARCHES ${_TIDY_ROOT}) +endif () + +set(TIDY_NAMES tidy) + +if (_TIDY_SEARCHES) + # Try each search configuration. + message(STATUS "+++ Search using paths ${_TIDY_SEARCHES}") + if (MSVC) + foreach(search ${_TIDY_SEARCHES}) + find_path(TIDY_INCLUDE_DIR + NAMES tidy.h + PATHS ${search} + PATH_SUFFIXES include + ) + # search for the STATIC version first + find_library(TIDY_LIBRARY_DBG + NAMES tidysd + PATHS ${search} + PATH_SUFFIXES lib + ) + find_library(TIDY_LIBRARY_REL + NAMES tidys + PATHS ${search} + PATH_SUFFIXES lib + ) + endforeach() + if (TIDY_LIBRARY_DBG AND TIDY_LIBRARY_REL) + set(TIDY_LIBRARY + debug ${TIDY_LIBRARY_DBG} + optimized ${TIDY_LIBRARY_REL} + ) + elseif (TIDY_LIBRARY_REL) + set(TIDY_LIBRARY ${TIDY_LIBRARY_REL} ) + endif () + if (NOT TIDY_LIBRARY) + foreach(search ${_TIDY_SEARCHES}) + find_path(TIDY_INCLUDE_DIR + NAMES tidy.h + PATHS ${search} + PATH_SUFFIXES include + ) + find_library(TIDY_LIBRARY + NAMES ${TIDY_NAMES} + PATHS ${search} + PATH_SUFFIXES lib + ) + endforeach() + endif () + else () + foreach(search ${_TIDY_SEARCHES}) + find_path(TIDY_INCLUDE_DIR + NAMES tidy.h + PATHS ${search} + PATH_SUFFIXES include + ) + if (USE_TIDY_STATIC) + # search for the static + find_library(TIDY_LIBRARY + NAMES tidys + PATHS ${search} + PATH_SUFFIXES lib + ) + endif () + if (NOT TIDY_LIBRARY) + # search for the shared + find_library(TIDY_LIBRARY + NAMES ${TIDY_NAMES} + PATHS ${search} + PATH_SUFFIXES lib + ) + endif () + endforeach() + endif () + +else () + message(STATUS "+++ Default search with no search paths") + find_path(TIDY_INCLUDE_DIR + NAMES tidy.h + PATH_SUFFIXES include + ) + if (USE_TIDY_STATIC) + # search for the static + find_library(TIDY_LIBRARY + NAMES tidys + PATH_SUFFIXES lib + ) + endif () + if (NOT TIDY_LIBRARY) + # search for the shared + find_library(TIDY_LIBRARY + NAMES ${TIDY_NAMES} + PATH_SUFFIXES lib + ) + endif () +endif () +###mark_as_advanced(TIDY_LIBRARY TIDY_INCLUDE_DIR) + +# handle the QUIETLY and REQUIRED arguments and set TIDY_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tidy REQUIRED_VARS TIDY_LIBRARY TIDY_INCLUDE_DIR + VERSION_VAR TIDY_VERSION_STRING) + +if(TIDY_FOUND) + set(Tidy_INCLUDE_DIRS ${TIDY_INCLUDE_DIR}) + set(Tidy_LIBRARIES ${TIDY_LIBRARY}) +endif() + +# eof
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor