mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-03 01:03:16 +00:00
cmake: unbundle stb (#1601)
This commit is contained in:
parent
642dedea8c
commit
874508f8c2
9 changed files with 46 additions and 9 deletions
19
cmake/Findstb.cmake
Normal file
19
cmake/Findstb.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_path(stb_image_INCLUDE_DIR stb_image.h PATH_SUFFIXES stb)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(stb
|
||||
REQUIRED_VARS stb_image_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if (stb_FOUND AND NOT TARGET stb::headers)
|
||||
add_library(stb::headers INTERFACE IMPORTED)
|
||||
set_property(TARGET stb::headers PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${stb_image_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(stb_image_INCLUDE_DIR)
|
Loading…
Add table
Add a link
Reference in a new issue