-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix shader bundling, use idiomatic data prefix, create install compon…
…ents, update dependencies
- Loading branch information
Showing
10 changed files
with
135 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#[=======================================================================[.rst: | ||
Findlibrashader | ||
------- | ||
Finds the slang-shaders library. | ||
Imported Targets | ||
^^^^^^^^^^^^^^^^ | ||
This module provides the following imported targets, if found: | ||
``libretro::slang_shaders`` | ||
Result Variables | ||
^^^^^^^^^^^^^^^^ | ||
This will define the following variables: | ||
``slang_shaders_FOUND`` | ||
Cache Variables | ||
^^^^^^^^^^^^^^^ | ||
The following cache variables may also be set: | ||
``slang_shaders_LOCATION`` | ||
The directory containing the libretro shader collection. | ||
#]=======================================================================] | ||
|
||
find_path( | ||
slang_shaders_LOCATION | ||
NAMES bilinear.slangp nearest.slangp | ||
PATHS /usr/share/libretro/shaders/shaders_slang /usr/local/share/libretro/shaders/shaders_slang ${CMAKE_PREFIX_PATH}/share/libretro/shaders/shaders_slang | ||
DOC "slang-shaders collection location" | ||
) | ||
|
||
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin|Windows") | ||
set(SLANG_ERROR_REASON "Ensure that ares-deps are provided as part of CMAKE_PREFIX_PATH.") | ||
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|FreeBSD") | ||
set(SLANG_ERROR_REASON "Ensure slang-shaders are installed in local data paths or that ares-deps are provided as part of CMAKE_PREFIX_PATH.") | ||
endif() | ||
|
||
find_package_handle_standard_args( | ||
slang_shaders | ||
REQUIRED_VARS slang_shaders_LOCATION | ||
REASON_FAILURE_MESSAGE "${SLANG_ERROR_REASON}" | ||
) | ||
|
||
if(NOT TARGET libretro::slang_shaders) | ||
if(slang_shaders_LOCATION) | ||
add_library(slang_shaders INTERFACE) | ||
set_target_properties( | ||
slang_shaders | ||
PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${slang_shaders_LOCATION}" | ||
) | ||
add_library(libretro::slang_shaders ALIAS slang_shaders) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters