-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (30 loc) · 1.46 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
cmake_minimum_required(VERSION 3.21)
project(sorting_algorithm_visualized )
set(CMAKE_CXX_STANDARD 14)
add_library(imgui
# Main Imgui files
src/vender/imgui/imgui.cpp src/vender/imgui/imgui_draw.cpp
src/vender/imgui/imgui_tables.cpp src/vender/imgui/imgui_widgets.cpp
src/vender/imgui/imgui_demo.cpp
# SDL2
src/vender/imgui/imgui_impl_sdl.cpp
src/vender/imgui/imgui_impl_sdlrenderer.cpp )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
if(UNIX)
find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})
endif()
include_directories(${PROJECT_SOURCE_DIR}/includes)
include_directories(${PROJECT_SOURCE_DIR}/src/vender)
if (WIN32)
include_directories(src/vender/SDL2/include)
LINK_DIRECTORIES(src/vender/SDL2/lib/x64)
endif ()
add_executable(sorting_algorithm_visualized src/main.cpp src/renderWindow.cpp src/renderWindow.h src/algorithems/insertionSort.cpp
src/algorithems/insertionSort.h src/rectangle.cpp src/rectangle.h
src/algorithems/algorithms.cpp src/algorithems/algorithms.h src/algorithems/quickSort.cpp src/algorithems/quickSort.h src/ObjectRender.h src/ObjectRender.cpp src/EventHandler.h src/EventHandler.cpp src/randomNumGen.h src/randomNumGen.cpp src/algorithems/bubbleSort.cpp src/algorithems/bubbleSort.h)
target_link_libraries(${PROJECT_NAME}
SDL2main
SDL2
imgui)
file(COPY src/vender/SDL2/lib/x64/SDL2.dll DESTINATION ${CMAKE_BINARY_DIR})