CMakeLists fix for Mac on Apple Silicon processors
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
project(LotoStatek)
|
project(LotoStatek)
|
||||||
|
include(FetchContent)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
add_executable(LotoStatek main.cpp
|
add_executable(LotoStatek main.cpp
|
||||||
@@ -63,9 +63,12 @@ if(WIN32)
|
|||||||
target_link_libraries(LotoStatek ${SFML_LIBRARIES})
|
target_link_libraries(LotoStatek ${SFML_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
find_package(SFML 2.6.2 COMPONENTS graphics window system REQUIRED)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
target_link_libraries(LotoStatek sfml-graphics sfml-window sfml-audio sfml-system)
|
FetchContent_Declare(
|
||||||
elseif(LINUX)
|
SFML
|
||||||
find_package(SFML 2.6.2 COMPONENTS graphics window system REQUIRED)
|
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)
|
target_link_libraries(LotoStatek sfml-graphics sfml-window sfml-audio sfml-system)
|
||||||
endif()
|
endif()
|
||||||
Reference in New Issue
Block a user