* manually add pygments hatchling DEP and update .cache
[t2sde.git] / package / develop / diligent-engine / no-build-third-party.patch
blob0a8f8baa25b37d37ee54051d2933106b903312c7
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/diligent-engine/no-build-third-party.patch
3 # Copyright (C) 2024 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 diff --git a/DiligentTools/ThirdParty/CMakeLists.txt b/DiligentTools/ThirdParty/CMakeLists.txt
15 index 3526783..8a1eb14 100644
16 --- a/DiligentTools/ThirdParty/CMakeLists.txt
17 +++ b/DiligentTools/ThirdParty/CMakeLists.txt
18 @@ -1,5 +1,10 @@
19 cmake_minimum_required (VERSION 3.6)
21 +find_package(PNG REQUIRED GLOBAL)
22 +find_package(TIFF REQUIRED GLOBAL)
23 +find_package(JPEG REQUIRED GLOBAL)
24 +find_package(ZLIB REQUIRED GLOBAL)
26 set(LICENSE_INSTALL_PATH "Licenses/ThirdParty/${DILIGENT_TOOLS_DIR}")
28 # Helper interface library to disable -Werror for the third-party libs
29 @@ -11,55 +16,6 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
30 target_compile_options(NO_WERROR INTERFACE -Wno-error)
31 endif()
34 -if (NOT TARGET JPEG::JPEG)
35 - add_subdirectory(libjpeg-9e)
36 - install(FILES libjpeg-9e/README DESTINATION ${LICENSE_INSTALL_PATH} RENAME libjpeg-readme.txt)
37 - list(APPEND THIRD_PARTY_TARGETS LibJpeg)
38 -endif()
40 -if (NOT TARGET TIFF::TIFF)
41 - add_subdirectory(libtiff)
42 - install(FILES libtiff/COPYRIGHT DESTINATION ${LICENSE_INSTALL_PATH} RENAME libtiff-copyright.txt)
43 - list(APPEND THIRD_PARTY_TARGETS LibTiff)
44 - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
45 - target_compile_options(LibTiff PRIVATE -Wno-shorten-64-to-32)
46 - endif()
47 -endif()
49 -if (NOT TARGET ZLIB::ZLIB)
50 - include(zlib.cmake)
51 - install(FILES zlib/README DESTINATION ${LICENSE_INSTALL_PATH} RENAME zlib-readme.txt)
52 - list(APPEND THIRD_PARTY_TARGETS ZLib)
53 - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
54 - target_compile_options(ZLib PRIVATE -Wno-shorten-64-to-32)
55 - endif()
56 -endif()
58 -if (NOT TARGET PNG::PNG)
59 - set(PNG_BUILD_ZLIB ON CACHE BOOL "Use find_package(zlib) to find ZLib location")
60 - set(PNG_SHARED OFF CACHE BOOL "Build shared version of libpng")
61 - set(PNG_TOOLS OFF CACHE BOOL "Build libpng tools")
62 - set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
63 - set(SKIP_INSTALL_ALL ON)
64 - set(PNG_FRAMEWORK OFF)
65 - if(PLATFORM_TVOS)
66 - # libpng does not support tvOS, but it does support iOS, so we can use the iOS target
67 - set(IOS TRUE)
68 - endif()
69 - add_subdirectory(libpng)
70 - set_target_properties(png_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
71 - set_directory_root_folder(libpng DiligentTools/ThirdParty/png)
72 - install(FILES libpng/LICENSE DESTINATION ${LICENSE_INSTALL_PATH} RENAME lpng-license.txt)
73 - add_library(PNG::PNG ALIAS png_static)
74 - list(APPEND THIRD_PARTY_TARGETS png_static)
76 - if (PLATFORM_EMSCRIPTEN)
77 - set_targets_emscripten_properties(png_static)
78 - endif()
79 -endif()
82 if (NOT DILIGENT_ARGS_DIR)
83 set(DILIGENT_ARGS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/args" CACHE PATH "args source directory")
84 endif()
85 @@ -75,15 +31,7 @@ endif()
86 install(FILES tinygltf/LICENSE DESTINATION ${LICENSE_INSTALL_PATH} RENAME tinygltf-license.txt)
87 install(FILES imGuIZMO.quat/license.txt DESTINATION ${LICENSE_INSTALL_PATH} RENAME imGuIZMO.quat-license.txt)
88 install(FILES stb/LICENSE DESTINATION "${LICENSE_INSTALL_PATH}" RENAME stb-license.txt)
89 -install(FILES json/LICENSE.MIT DESTINATION ${LICENSE_INSTALL_PATH} RENAME json-license.txt)
92 add_library(Diligent-JSON INTERFACE)
93 -target_include_directories(Diligent-JSON INTERFACE json/single_include/nlohmann)
94 -# WARNING: JSON_DIAGNOSTICS must be consistently defined for all inclusions of json.hpp,
95 -# or there will be hard-to-diagnose run-time crashes.
96 -# It is required by RenderStatePackager even in release builds.
97 -target_compile_definitions(Diligent-JSON INTERFACE JSON_DIAGNOSTICS=1)
100 if (NOT DILIGENT_DEAR_IMGUI_PATH)