early-access version 2853
This commit is contained in:
84
externals/vcpkg/ports/soil2/CMakeLists.txt
vendored
Executable file
84
externals/vcpkg/ports/soil2/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,84 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
# Create the soil2 project
|
||||
project("soil2" LANGUAGES C)
|
||||
|
||||
find_package(OpenGL)
|
||||
|
||||
# Do we want to install the headers?
|
||||
option(INSTALL_HEADERS "Install header files" ON)
|
||||
|
||||
# Set the install dir
|
||||
set(INSTALL_CMAKE_DIR share/soil2)
|
||||
|
||||
# Set the source files to compile
|
||||
set(SOIL2_SRC
|
||||
"src/SOIL2/image_DXT.c"
|
||||
"src/SOIL2/image_DXT.h"
|
||||
"src/SOIL2/image_helper.c"
|
||||
"src/SOIL2/image_helper.h"
|
||||
"src/SOIL2/jo_jpeg.h"
|
||||
"src/SOIL2/pkm_helper.h"
|
||||
"src/SOIL2/pvr_helper.h"
|
||||
"src/SOIL2/SOIL2.c"
|
||||
"src/SOIL2/SOIL2.h"
|
||||
"src/SOIL2/stbi_DDS.h"
|
||||
"src/SOIL2/stbi_DDS_c.h"
|
||||
"src/SOIL2/stbi_ext.h"
|
||||
"src/SOIL2/stbi_ext_c.h"
|
||||
"src/SOIL2/stbi_pkm.h"
|
||||
"src/SOIL2/stbi_pkm_c.h"
|
||||
"src/SOIL2/stbi_pvr.h"
|
||||
"src/SOIL2/stbi_pvr_c.h"
|
||||
"src/SOIL2/stb_image.h"
|
||||
"src/SOIL2/stb_image_write.h"
|
||||
"src/SOIL2/wfETC.c"
|
||||
"src/SOIL2/wfETC.h"
|
||||
)
|
||||
|
||||
# Add the library as a static linkage
|
||||
add_library(soil2 STATIC ${SOIL2_SRC})
|
||||
|
||||
# The include dir
|
||||
target_include_directories(soil2 INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
# link opengl32
|
||||
target_link_libraries(soil2 PRIVATE ${OPENGL_gl_LIBRARY})
|
||||
|
||||
# If its msvc mute the secure warnings
|
||||
if(MSVC)
|
||||
target_compile_definitions(soil2 PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
endif(MSVC)
|
||||
|
||||
if(INSTALL_HEADERS)
|
||||
# Install the library object
|
||||
install(TARGETS soil2 EXPORT soil2Targets
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
|
||||
# Install the headers
|
||||
install(FILES "src/SOIL2/SOIL2.h" DESTINATION include/SOIL2/)
|
||||
|
||||
# Export the stuff
|
||||
export(TARGETS soil2 FILE "${PROJECT_BINARY_DIR}/soil2Targets.cmake")
|
||||
export(PACKAGE soil2)
|
||||
|
||||
# Create the soil2Config.cmake and soil2ConfigVersion.cmake
|
||||
configure_file(soil2Config.cmake.in "${PROJECT_BINARY_DIR}/soil2Config.cmake" @ONLY)
|
||||
|
||||
# Install the soil2Config.cmake and soil2ConfigVersion.cmake
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/soil2Config.cmake"
|
||||
DESTINATION "${INSTALL_CMAKE_DIR}"
|
||||
)
|
||||
|
||||
# Install the export set for use with the install-tree
|
||||
install(EXPORT soil2Targets DESTINATION "${INSTALL_CMAKE_DIR}")
|
||||
else(INSTALL_HEADERS)
|
||||
# Install the library object
|
||||
install(TARGETS soil2 EXPORT soil2
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
endif(INSTALL_HEADERS)
|
||||
20
externals/vcpkg/ports/soil2/Workaround-ICE-in-release.patch
vendored
Executable file
20
externals/vcpkg/ports/soil2/Workaround-ICE-in-release.patch
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
diff --git a/src/SOIL2/SOIL2.c b/src/SOIL2/SOIL2.c
|
||||
index 3a10885..01bbb23 100644
|
||||
--- a/src/SOIL2/SOIL2.c
|
||||
+++ b/src/SOIL2/SOIL2.c
|
||||
@@ -2027,6 +2027,7 @@ const char*
|
||||
return result_string_pointer;
|
||||
}
|
||||
|
||||
+#pragma optimize("", off)
|
||||
unsigned int SOIL_direct_load_DDS_from_memory(
|
||||
const unsigned char *const buffer,
|
||||
int buffer_length,
|
||||
@@ -2409,6 +2410,7 @@ unsigned int SOIL_direct_load_DDS_from_memory(
|
||||
quick_exit:
|
||||
return tex_ID;
|
||||
}
|
||||
+#pragma optimize("", on)
|
||||
|
||||
unsigned int SOIL_direct_load_DDS(
|
||||
const char *filename,
|
||||
25
externals/vcpkg/ports/soil2/portfile.cmake
vendored
Executable file
25
externals/vcpkg/ports/soil2/portfile.cmake
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO SpartanJ/soil2
|
||||
REF ddcb35d13cc4129103de1c1a3cb74b828fe46b4a # 1.3.0
|
||||
SHA512 627c7bf4fddd5afef85ba7634c5ec0e10005c700abc1eb07c6346c1604e430c34aa4c33f6ffecbecb3dc2b04de7b855a3f6d923e94f23621ae0184e706358908
|
||||
HEAD_REF master
|
||||
PATCHES Workaround-ICE-in-release.patch
|
||||
)
|
||||
|
||||
file(
|
||||
COPY
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/soil2Config.cmake.in"
|
||||
DESTINATION "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
13
externals/vcpkg/ports/soil2/soil2Config.cmake.in
vendored
Executable file
13
externals/vcpkg/ports/soil2/soil2Config.cmake.in
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
# - Config file for the soil2 package
|
||||
# It defines the following variables
|
||||
# SOIL2_INCLUDE_DIRS - include directories for SOIL2
|
||||
# SOIL2_LIBRARIES - libraries to link against
|
||||
|
||||
# Load targets
|
||||
get_filename_component(SOIL2_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
include("${SOIL2_CMAKE_DIR}/soil2Targets.cmake")
|
||||
|
||||
# Set properties
|
||||
get_target_property(SOIL2_INCLUDE_DIRS soil2 INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(SOIL2_LIBRARIES soil2)
|
||||
mark_as_advanced(SOIL2_INCLUDE_DIRS SOIL2_LIBRARIES)
|
||||
13
externals/vcpkg/ports/soil2/vcpkg.json
vendored
Executable file
13
externals/vcpkg/ports/soil2/vcpkg.json
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "soil2",
|
||||
"version": "1.3.0",
|
||||
"description": "Simple OpenGL Image Library 2",
|
||||
"homepage": "https://github.com/SpartanJ/SOIL2",
|
||||
"license": "MIT-0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user