generated from cpp-toolbox/mwe_scripted_scene_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (29 loc) · 1.16 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.10)
project(mwe_scripted_scene_manager)
add_compile_definitions(_USE_MATH_DEFINES)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 20)
file(GLOB_RECURSE SOURCES "src/*.cpp")
# Add the main executable
add_executable(${PROJECT_NAME} ${SOURCES})
add_custom_target(copy_resources ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/assets
${PROJECT_BINARY_DIR}/assets
COMMENT "Copying resources into the runtime output directory")
add_custom_target(copy_scripts ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/scripts
${PROJECT_BINARY_DIR}/scripts
COMMENT "Copying scripts into the runtime output directory")
add_dependencies(${PROJECT_NAME} copy_resources copy_scripts )
find_package(glad)
find_package(glfw3)
find_package(stb)
find_package(glm)
find_package(nlohmann_json)
find_package(spdlog)
find_package(SndFile)
find_package(OpenAL)
find_package(assimp)
target_link_libraries(${PROJECT_NAME} glad::glad glfw glm::glm nlohmann_json::nlohmann_json spdlog::spdlog SndFile::sndfile OpenAL::OpenAL assimp::assimp stb::stb)