-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Distributed under the OSI-approved BSD 3-Clause License. | ||
|
||
#.rst: | ||
# FindStb | ||
# ------------ | ||
# | ||
# Find the Stb include headers. | ||
# | ||
# Result Variables | ||
# ^^^^^^^^^^^^^^^^ | ||
# | ||
# This module defines the following variables: | ||
# | ||
# ``Stb_FOUND`` | ||
# True if Stb library found | ||
# | ||
# ``Stb_INCLUDE_DIR`` | ||
# Location of Stb headers | ||
# | ||
|
||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) | ||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) | ||
|
||
if(NOT Stb_INCLUDE_DIR) | ||
find_path(Stb_INCLUDE_DIR NAMES stb_image.h PATHS ${Stb_DIR} PATH_SUFFIXES include) | ||
endif() | ||
|
||
find_package_handle_standard_args(Stb DEFAULT_MSG Stb_INCLUDE_DIR) | ||
mark_as_advanced(Stb_INCLUDE_DIR) |
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,16 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO nothings/stb | ||
REF f75e8d1cad7d90d72ef7a4661f1b994ef78b4e31 # committed on 2024-07-29 | ||
SHA512 4a733aefb816a366c999663e3d482144616721b26c321ee5dd0dce611a34050b6aef97d46bd2c4f8a9631d83b097491a7ce88607fd9493d880aaa94567a68cce | ||
HEAD_REF master | ||
) | ||
|
||
file(GLOB HEADER_FILES "${SOURCE_PATH}/*.h" "${SOURCE_PATH}/stb_vorbis.c") | ||
file(COPY ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include") | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindStb.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
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,4 @@ | ||
The package stb provides CMake targets: | ||
|
||
find_package(Stb REQUIRED) | ||
target_include_directories(main PRIVATE ${Stb_INCLUDE_DIR}) |
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,6 @@ | ||
set(STB_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) | ||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
_find_package(${ARGS}) | ||
|
||
set(CMAKE_MODULE_PATH ${STB_PREV_MODULE_PATH}) |
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,8 @@ | ||
{ | ||
"name": "stb", | ||
"version-date": "2024-07-29", | ||
"port-version": 1, | ||
"description": "public domain header-only libraries", | ||
"homepage": "https://github.com/nothings/stb", | ||
"license": "MIT OR CC-PDDC" | ||
} |