-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (30 loc) · 1.09 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
project(ESniper)
set(CMAKE_CXX_STANDARD 17)
add_subdirectory(src)
# cubiomes
add_subdirectory(vendor/cubiomes)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/cubiomes)
target_link_libraries(ESniper PRIVATE cubiomes)
target_include_directories(ESniper PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/vendor/cubiomes)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fwrapv -lm")
# SFML
set(SFML_STATIC_LIBRARIES FALSE)
find_package(SFML 2.5.1 COMPONENTS graphics window system audio REQUIRED)
target_link_libraries(ESniper PRIVATE sfml-graphics sfml-window sfml-system sfml-audio)
# ImGui
set(IMGUI_SFML_FIND_SFML OFF)
set(IMGUI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/vendor/imgui)
# target_include_directories(ESniper PRIVATE ${IMGUI_DIR})
# SFML-ImGui
add_subdirectory(vendor/imgui-sfml)
target_link_libraries(ESniper
PUBLIC
ImGui-SFML::ImGui-SFML
)
# OpenMP
find_package(OpenMP REQUIRED) # Add this line to find OpenMP
if(OpenMP_CXX_FOUND) # Check if OpenMP was found
target_link_libraries(ESniper PRIVATE OpenMP::OpenMP_CXX) # Link OpenMP
endif()
file(MAKE_DIRECTORY searched)