Starting repo

This commit is contained in:
HKU Aaron Account 2025-08-28 14:52:41 +02:00
commit d318b72c3b
5 changed files with 113 additions and 0 deletions

48
dependencies/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,48 @@
include(FetchContent)
set(SFML_VERSION 3.0.0)
set(IMGUI_VERSION 1.91.1)
option(LINK_DEPS_STATIC CACHE ON)
# Don't build shared libs if we want to link to deps statically
if(LINK_DEPS_STATIC)
set(BUILD_SHARED_LIBS OFF)
else()
set(BUILD_SHARED_LIBS ON)
endif()
# Get stripped down release zips
FetchContent_Declare(
SFML
URL "https://github.com/SFML/SFML/archive/${SFML_VERSION}.zip"
)
FetchContent_Declare(
imgui
URL "https://github.com/ocornut/imgui/archive/v${IMGUI_VERSION}.zip"
)
# imgui_sfml full repo
FetchContent_Declare(
imgui-sfml
GIT_REPOSITORY https://github.com/SFML/imgui-sfml.git
GIT_TAG v3.0
)
# BUILDING
# SFML
option(SFML_BUILD_AUDIO "Build audio" OFF)
option(SFML_BUILD_NETWORK "Build network" OFF)
FetchContent_MakeAvailable(sfml)
# IMGUI
FetchContent_MakeAvailable(imgui)
# IMGUI-SFML
set(IMGUI_DIR ${imgui_SOURCE_DIR})
option(IMGUI_SFML_FIND_SFML "Use find_package to find SFML" OFF)
option(IMGUI_SFML_IMGUI_DEMO "Build imgui_demo.cpp" ON)
FetchContent_MakeAvailable(imgui-sfml)