@@ -8,16 +8,20 @@ set(FETCH_CONTENT_QUIET FALSE)
88FetchContent_Declare(
99 glew
1010
11- URL https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.zip
12- URL_HASH MD5=970535b75b1b69ebd018a0fa05af63d1
13- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/glew
11+ # URL https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.zip
12+ # URL_HASH MD5=970535b75b1b69ebd018a0fa05af63d1
13+ GIT_REPOSITORY https://github.com/Perlmint/glew-cmake.git
14+ GIT_TAG 918ece3da858c2e28e10f6507378af01647cb139
15+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/glew
1416)
1517
1618FetchContent_Declare(
1719 sdl2
1820
19- URL https://github.com/libsdl-org/SDL/releases/download/release-2.26.5/SDL2-2.26.5.zip
20- URL_HASH MD5=0664f3980570c4641128866e6c9f2e29
21+ URL https://github.com/libsdl-org/SDL/releases/download/release-2.32.4/SDL2-2.32.4.zip
22+ # URL_HASH MD5=ccda8e75aa61112bc541eeb78d13784d
23+ # GIT_REPOSITORY https://github.com/lidsdl-org/SDL.git
24+ # GIT_TAG 2359383fc187386204c3bb22de89655a494cd128
2125 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/sdl2
2226)
2327
@@ -26,22 +30,26 @@ FetchContent_Declare(
2630
2731 URL https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.3/SDL2_image-2.6.3.zip
2832 URL_HASH MD5=ecedb5078bbd31e7d1552e2b1443d2f6
33+ # GIT_REPOSITORY https://github.com/libsdl-org/SDL_image.git
34+ # GIT_TAG c1bf2245b0ba63a25afe2f8574d305feca25af77
2935 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/sdl2_image
3036)
3137
3238FetchContent_Declare(
3339 sdl2_ttf
3440
35- URL https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.2/SDL2_ttf-2.20.2.zip
36- URL_HASH MD5=7258258fdb2a4adb0072d337f94305f9
41+ # URL https://github.com/libsdl-org/SDL_ttf/releases/download/release-3.2.2/SDL3_ttf-3.2.2.zip
42+ # URL_HASH MD5=e4ddd51fa4825f26b5c9bc8f4b010ed1
43+ GIT_REPOSITORY https://github.com/libsdl-org/SDL_ttf.git
44+ GIT_TAG db1e6d14494bfffe464c50667a26941cc3a36324
3745 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/sdl2_ttf
3846)
3947FetchContent_Declare(
40- sdl2_mixer
48+ sdl2_mixer
4149
42- URL https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.3/SDL2_mixer-2.6.3.zip
43- URL_HASH MD5=fb3e71ef072ff8dd793cec3ed384f9a0
44- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/sdl2_mixer
50+ URL https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.3/SDL2_mixer-2.6.3.zip
51+ URL_HASH MD5=fb3e71ef072ff8dd793cec3ed384f9a0
52+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/sdl2_mixer
4553)
4654
4755FetchContent_Declare( # At this time 1.11.0 has some issues formatting `const unsigned char *`
@@ -55,8 +63,8 @@ FetchContent_Declare( # At this time 1.11.0 has some issues formatting `const un
5563FetchContent_Declare(
5664 glm
5765
58- URL https://github.com/g-truc/glm/releases/download/0.9.9.8 /glm-0.9.9.8.zip
59- URL_HASH MD5=69895110052f0d711c9c54fbf385f6f5
66+ URL https://github.com/g-truc/glm/releases/download/1.0.1 /glm-1.0.1-light.7z
67+ # URL_HASH MD5=7d235d4813a2e7b1e10cc711b8e25213
6068 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/glm
6169)
6270
@@ -114,7 +122,7 @@ add_compile_definitions(GLEW_NO_GLU)
114122FetchContent_GetProperties(glew)
115123if (NOT ${glew_POPULATED} )
116124 FetchContent_Populate(glew)
117- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /lib/glew/ build /cmake )
125+ add_subdirectory (${glew_SOURCE_DIR} ${glew_BINARY_DIR} EXCLUDE_FROM_ALL )
118126endif ()
119127
120128FetchContent_GetProperties(imgui)
@@ -147,7 +155,7 @@ endif()
147155
148156set (DEPENDENCY_LINK_LIBRARIES
149157 ${OPENGL_LIBRARY}
150- glew_s
158+ libglew_static
151159
152160 SDL2::SDL2-static
153161 SDL2_image::SDL2_image-static
@@ -165,7 +173,7 @@ set(DEPENDENCY_INCLUDE_DIRS
165173 ${CMAKE_CURRENT_SOURCE_DIR} /lib/sdl2/include /
166174 ${CMAKE_CURRENT_SOURCE_DIR} /lib/glew/include /
167175 ${CMAKE_CURRENT_SOURCE_DIR} /lib/spdlog/include /
168- ${CMAKE_CURRENT_SOURCE_DIR} /lib/glm/
176+ ${CMAKE_CURRENT_SOURCE_DIR} /lib/
169177 ${IMGUI_INCLUDE_DIR}
170178 ${CMAKE_CURRENT_SOURCE_DIR} /lib/nlohmann_json/include /
171179)
0 commit comments