-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (48 loc) · 1.73 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 3.25)
project(silnik2D)
set(CMAKE_CXX_STANDARD 17)
add_executable(silnik2D main.cpp
Engine.cpp
Engine.h
Engine.h
definitions/Keyboard.cpp
definitions/Mouse.cpp
definitions/Point.cpp
definitions/PrimitiveRenderer.cpp
definitions/Figure.cpp
definitions/Square.cpp
definitions/Triangle.cpp
definitions/Circle.cpp
definitions/AnimatedCharacter.cpp
headers/Figure.h
headers/Square.h
headers/Triangle.h
headers/Circle.h
headers/PrimitiveRenderer.h
headers/Point.h
headers/Keyboard.h
headers/Mouse.h
headers/AnimatedCharacter.h
headers/Bitmap.h
definitions/Bitmap.cpp
"headers/PongGame.h"
)
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(silnik2D ${SFML_LIBRARIES})
endif()
elseif(APPLE)
find_package(SFML 2.5.1 COMPONENTS graphics window system REQUIRED)
target_link_libraries(silnik2D sfml-graphics)
elseif(LINUX)
find_package(SFML 2.5.1 COMPONENTS graphics window system REQUIRED)
target_link_libraries(silnik2D sfml-graphics)
endif()