Skip to content

Commit df6843b

Browse files
committed
Add stb_image_write library for image writing features
1 parent cc01c2e commit df6843b

File tree

8 files changed

+12774
-96
lines changed

8 files changed

+12774
-96
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ if(NOT EMSCRIPTEN)
3131
add_subdirectory(test)
3232
endif()
3333

34-
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/experimental")
35-
add_subdirectory(experimental)
36-
endif()
34+
#if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/experimental")
35+
# add_subdirectory(experimental)
36+
#endif()
3737

3838
set(CPACK_PACKAGE_VENDOR "gulrak.net")
3939
set(CPACK_PACKAGE_CONTACT "s.schuemann@pobox.com")
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Cross-compile macOS (Apple Silicon) -> Windows x86_64 using Homebrew mingw-w64
2+
3+
set(CMAKE_SYSTEM_NAME Windows)
4+
set(CMAKE_SYSTEM_PROCESSOR x86_64)
5+
6+
# Homebrew prefix
7+
set(_brew "/opt/homebrew")
8+
set(_triplet "x86_64-w64-mingw32")
9+
10+
# Compilers / binutils
11+
find_program(CMAKE_C_COMPILER NAMES ${_triplet}-gcc HINTS "${_brew}/bin" REQUIRED)
12+
find_program(CMAKE_CXX_COMPILER NAMES ${_triplet}-g++ HINTS "${_brew}/bin" REQUIRED)
13+
find_program(CMAKE_RC_COMPILER NAMES ${_triplet}-windres HINTS "${_brew}/bin")
14+
find_program(CMAKE_AR NAMES ${_triplet}-ar HINTS "${_brew}/bin")
15+
find_program(CMAKE_RANLIB NAMES ${_triplet}-ranlib HINTS "${_brew}/bin")
16+
find_program(CMAKE_STRIP NAMES ${_triplet}-strip HINTS "${_brew}/bin")
17+
18+
# Helps CMake find the right headers/libs under the MinGW sysroot
19+
execute_process(
20+
COMMAND "${CMAKE_C_COMPILER}" -print-sysroot
21+
OUTPUT_VARIABLE _sysroot
22+
OUTPUT_STRIP_TRAILING_WHITESPACE
23+
ERROR_QUIET
24+
)
25+
26+
set(CMAKE_FIND_ROOT_PATH "")
27+
if(_sysroot AND EXISTS "${_sysroot}")
28+
list(APPEND CMAKE_FIND_ROOT_PATH "${_sysroot}")
29+
endif()
30+
if(EXISTS "${_brew}/opt/mingw-w64")
31+
list(APPEND CMAKE_FIND_ROOT_PATH "${_brew}/opt/mingw-w64")
32+
endif()
33+
34+
# Prevent accidental pickup of macOS host deps
35+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
36+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
37+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
38+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

external/nothings/stb_image_resize2.h

Lines changed: 10651 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)