-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (31 loc) · 955 Bytes
/
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
cmake_minimum_required(VERSION 3.17)
project(Lambda2D)
set(CMAKE_CXX_STANDARD 20)
add_executable(Lambda2D
main.cpp
src/World.cpp
src/Polygon.cpp
src/NarrowPhase.cpp
src/MathsUtils.cpp
src/DynamicBVHTree.cpp
src/Arbiter.cpp
src/AABB.cpp
src/Drawer.cpp
src/RigidBody.cpp
)
include_directories(headers /usr/include c:/SFML/include)
set(SFML_ROOT c:/SFML)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML REQUIRED system window graphics)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(Lambda2D ${SFML_LIBRARIES})
endif()
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})
# Copy dlls to build directory
if(WIN32)
file(GLOB BINARY_DEP_DLLS "${SFML_INCLUDE_DIR}/../bin/*.dll")
file(COPY ${BINARY_DEP_DLLS} DESTINATION ${CMAKE_BINARY_DIR})
file(GLOB MINGW_DEP_DLLS "C:/mingw64/bin/*.dll")
file(COPY ${MINGW_DEP_DLLS} DESTINATION ${CMAKE_BINARY_DIR})
endif()