APPLE sucks and their libc libraries are old as fuck so c++23 things are not available like linux. Added MAC support so i can develop

This commit is contained in:
DarthMooMancer
2025-10-23 23:18:23 -04:00
parent 8f11e24339
commit cebb2e0ce9
3 changed files with 87 additions and 24 deletions
+21
View File
@@ -20,6 +20,27 @@ FetchContent_Declare(SFML
EXCLUDE_FROM_ALL
SYSTEM)
FetchContent_MakeAvailable(SFML)
# Detect macOS
if(APPLE)
message(STATUS "Detected macOS — using range-v3 for cartesian_product")
include(FetchContent)
FetchContent_Declare(
range-v3
GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
GIT_TAG 0.12.0
GIT_SHALLOW ON
)
FetchContent_MakeAvailable(range-v3)
# Add include directory globally or per target
include_directories(${range-v3_SOURCE_DIR}/include)
# Optional: expose a macro so you can #ifdef it in code
add_compile_definitions(USE_RANGE_V3)
else()
message(STATUS "Non-macOS system — assuming std::views::cartesian_product is available")
endif()
add_executable(SFML_game_engine ${SOURCES})
target_link_libraries(SFML_game_engine