cmake_minimum_required(VERSION 3.25) project(LotoStatek) set(CMAKE_CXX_STANDARD 17) add_executable(LotoStatek main.cpp) if(WIN32) set(SFML_ROOT "${CMAKE_SOURCE_DIR}/SFML") # set(SFML_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/SFML/include") file(GLOB BINARY_DEP_DLLS "${SFML_INCLUDE_DIR}/../bin/*.dll") file(COPY ${BINARY_DEP_DLLS} DESTINATION ${CMAKE_BINARY_DIR}) include_directories("${CMAKE_SOURCE_DIR}/SFML/bin" "${CMAKE_SOURCE_DIR}/SFML/include" "${CMAKE_SOURCE_DIR}/SFML/lib/cmake/SFML") # dodane set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules") # dodane find_package(SFML 2.5.1 COMPONENTS graphics window system REQUIRED) if(SFML_FOUND) include_directories(${SFML_INCLUDE_DIR}) target_link_libraries(LotoStatek ${SFML_LIBRARIES}) endif() elseif(APPLE) find_package(SFML 2.5.1 COMPONENTS graphics window system REQUIRED) target_link_libraries(LotoStatek sfml-graphics) elseif(LINUX) find_package(SFML 2.5.1 COMPONENTS graphics window system REQUIRED) target_link_libraries(LotoStatek sfml-graphics) endif()