-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (35 loc) · 1.3 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
# CMakeList.txt : projet CMake pour SavageCube, incluez la source et définissez
# la logique spécifique au projet ici.
#
cmake_minimum_required (VERSION 3.8)
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
endif()
project ("SavageCube")
set(CMAKE_CXX_STANDARD 17)
find_package(OpenGL REQUIRED)
find_package(SDL2 REQUIRED)
find_package(sdl2-image REQUIRED)
find_package(glm REQUIRED)
find_package(imgui REQUIRED)
include_directories(
include
"biohazard3d/include/"
"biohazard3d/include/imgui"
)
set(vlink "mklink /d \"${PROJECT_BINARY_DIR}/data3d\" \"${PROJECT_SOURCE_DIR}/data3d\"")
message("msg - cmd /c ${vlink}")
execute_process(COMMAND cmd /c "${vlink}")
# Crée des variables avec les fichiers à compiler
file(GLOB SOURCEFILES
"*.cpp")
add_subdirectory(biohazard3d)
# Ajoutez une source à l'exécutable de ce projet.
add_executable (SavageCube ${SOURCEFILES})
target_link_libraries(SavageCube libbiohazard3d)
target_link_libraries(SavageCube glm)
target_link_libraries(SavageCube SDL2::SDL2 SDL2::SDL2main)
target_link_libraries(SavageCube SDL2::SDL2_image)
target_link_libraries(SavageCube imgui::imgui)
# TODO: Ajoutez des tests et installez des cibles si nécessaire.