Warning, /plasma/breeze-gtk/cmake/FindSass.cmake is written in an unsupported language. File is not indexed.
0001 #.rst: 0002 # FindSass 0003 # ----------- 0004 # 0005 # Try to find Sass compiler. 0006 # 0007 # If the Sass compiler executable is not in your PATH, you can provide 0008 # an alternative name or full path location with the ``Sass_EXECUTABLE`` variable. 0009 # In this case, do not forget to set ``Sass_COMPILER_TYPE`` variable also. 0010 # 0011 # This will define the following variables: 0012 # 0013 # ``Sass_FOUND`` 0014 # True if sass is available. 0015 # 0016 # ``Sass_EXECUTABLE`` 0017 # The Sass compiler executable. 0018 # 0019 # ``Sass_COMPILER_TYPE`` 0020 # Sass compiler type: ``sass`` or ``sassc``. 0021 # 0022 # If ``Sass_FOUND`` is TRUE, it will also define the following imported 0023 # target: 0024 # 0025 # ``Sass::Sass`` 0026 # The Sass compiler executable. 0027 # 0028 0029 #============================================================================= 0030 # SPDX-FileCopyrightText: 2018 Alexander Kernozhitsky <sh200105@mail.ru> 0031 # 0032 # SPDX-License-Identifier: BSD-3-Clause 0033 #============================================================================= 0034 0035 set_package_properties(Sass PROPERTIES 0036 DESCRIPTION "SASS compiler" 0037 URL "https://sass-lang.com/" 0038 PURPOSE "Required for building GTK themes") 0039 0040 find_program(Sass_EXECUTABLE NAMES sassc) 0041 0042 if(Sass_EXECUTABLE) 0043 if(NOT Sass_COMPILER_TYPE) 0044 set(Sass_COMPILER_TYPE sassc) 0045 endif() 0046 else() 0047 find_program(Sass_EXECUTABLE NAMES sass) 0048 set(Sass_COMPILER_TYPE sass) 0049 endif() 0050 0051 include(FindPackageHandleStandardArgs) 0052 0053 find_package_handle_standard_args(Sass 0054 FOUND_VAR 0055 Sass_FOUND 0056 REQUIRED_VARS 0057 Sass_EXECUTABLE 0058 ) 0059 mark_as_advanced(Sass_EXECUTABLE) 0060 0061 if (Sass_FOUND) 0062 if (NOT TARGET Sass::Sass) 0063 add_executable(Sass::Sass IMPORTED) 0064 set_target_properties(Sass::Sass PROPERTIES 0065 IMPORTED_LOCATION "${Sass_EXECUTABLE}" 0066 ) 0067 endif() 0068 endif()