CMakeLists fix for Mac on Apple Silicon processors

This commit is contained in:
2025-02-08 12:26:36 +01:00
parent 817b94321b
commit db972f8635

View File

@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.25)
project(LotoStatek)
include(FetchContent)
set(CMAKE_CXX_STANDARD 17)
add_executable(LotoStatek main.cpp
@@ -63,9 +63,12 @@ if(WIN32)
target_link_libraries(LotoStatek ${SFML_LIBRARIES})
endif()
elseif(APPLE)
find_package(SFML 2.6.2 COMPONENTS graphics window system REQUIRED)
target_link_libraries(LotoStatek sfml-graphics sfml-window sfml-audio sfml-system)
elseif(LINUX)
find_package(SFML 2.6.2 COMPONENTS graphics window system REQUIRED)
set(BUILD_SHARED_LIBS OFF)
FetchContent_Declare(
SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.6.2
)
FetchContent_MakeAvailable(SFML)
target_link_libraries(LotoStatek sfml-graphics sfml-window sfml-audio sfml-system)
endif()