-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (42 loc) · 1.53 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
cmake_minimum_required(VERSION 3.25)
project(magnum-playground)
### LANGUAGES
set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
### OPTIONS
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "" FORCE)
set(MAGNUM_WITH_SDL2APPLICATION ON CACHE BOOL "" FORCE)
set(MAGNUM_WITH_IMGUI ON CACHE BOOL "" FORCE)
set(MAGNUM_WITH_TRADE ON CACHE BOOL "" FORCE)
set(MAGNUM_WITH_OBJIMPORTER ON CACHE BOOL "" FORCE)
set(MAGNUM_WITH_EIGEN ON CACHE BOOL "" FORCE)
set(MAGNUM_WITH_PRIMITIVES ON CACHE BOOL "" FORCE)
set(MAGNUM_TARGET_EGL ON CACHE BOOL "" FORCE)
### CMAKE MODULES
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/3rd/magnum/modules/")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/3rd/magnum-integration/modules/")
add_subdirectory(3rd)
message(${CMAKE_MODULE_PATH})
### FIND DEPENDENCIES
find_package(Eigen3 3.4 REQUIRED NO_MODULE)
find_package(Corrade REQUIRED)
find_package(Magnum REQUIRED GL Shaders Sdl2Application Primitives Trade ObjImporter MeshTools)
find_package(MagnumIntegration REQUIRED ImGui Eigen)
### ADD TARGET
set(TARGET_NAME playground)
add_executable(${TARGET_NAME} src/main.cpp src/playground.cpp)
add_dependencies(${TARGET_NAME} Magnum::ObjImporter)
target_compile_definitions(${TARGET_NAME} PRIVATE MAGNUM_IMGUIINTEGRATION_USER_CONFIG="imconfig.h")
target_link_libraries(
${TARGET_NAME}
PRIVATE
Eigen3::Eigen
Corrade::Main
Magnum::Application
Magnum::GL
Magnum::Magnum
Magnum::Shaders
Magnum::Trade
Magnum::MeshTools
Magnum::Primitives
MagnumIntegration::ImGui ImGuiFileDialog)