changing cmake
This commit is contained in:
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
build/
|
build/
|
||||||
.cache/
|
.cache/
|
||||||
|
.DS_Store
|
||||||
|
|||||||
+2
-8
@@ -21,9 +21,9 @@ FetchContent_Declare(SFML
|
|||||||
EXCLUDE_FROM_ALL
|
EXCLUDE_FROM_ALL
|
||||||
SYSTEM)
|
SYSTEM)
|
||||||
FetchContent_MakeAvailable(SFML)
|
FetchContent_MakeAvailable(SFML)
|
||||||
# Detect macOS
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
message(STATUS "Detected macOS — using range-v3 for cartesian_product")
|
message(STATUS "Detected macOS: installing range-v3")
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
@@ -34,13 +34,7 @@ if(APPLE)
|
|||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(range-v3)
|
FetchContent_MakeAvailable(range-v3)
|
||||||
|
|
||||||
# Add include directory globally or per target
|
|
||||||
include_directories(${range-v3_SOURCE_DIR}/include)
|
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()
|
endif()
|
||||||
|
|
||||||
add_executable(SFML_game_engine ${SOURCES})
|
add_executable(SFML_game_engine ${SOURCES})
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
Reference in New Issue
Block a user