2020-12-04 09:39:06 +08:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/lib/graphics_engine/include")
|
2022-04-19 12:49:05 +08:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/lib/graphics_utils")
|
2021-04-14 09:34:59 +08:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/lib/irrlicht/include")
|
2021-06-10 01:02:24 +08:00
|
|
|
find_path(SDL2_INCLUDEDIR NAMES SDL.h PATH_SUFFIXES SDL2 include/SDL2 include PATHS)
|
|
|
|
if (NOT SDL2_INCLUDEDIR)
|
|
|
|
message(FATAL_ERROR "SDL2 not found.")
|
|
|
|
else()
|
|
|
|
include_directories("${SDL2_INCLUDEDIR}")
|
|
|
|
endif()
|
|
|
|
|
2021-06-10 13:21:11 +08:00
|
|
|
if(APPLE AND NOT DLOPEN_MOLTENVK)
|
|
|
|
find_path(VULKAN_INCLUDEDIR NAMES vulkan/vulkan.h PATHS)
|
|
|
|
if (NOT VULKAN_INCLUDEDIR)
|
|
|
|
message(FATAL_ERROR "Vulkan not found.")
|
|
|
|
else()
|
|
|
|
include_directories("${VULKAN_INCLUDEDIR}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-04-18 09:46:44 +08:00
|
|
|
if(UNIX OR MINGW)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
|
|
|
endif()
|
2021-06-10 13:21:11 +08:00
|
|
|
|
|
|
|
set(GE_SOURCES
|
2020-12-04 09:39:06 +08:00
|
|
|
src/gl.c
|
2021-04-14 09:34:59 +08:00
|
|
|
src/ge_main.cpp
|
|
|
|
src/ge_texture.cpp
|
2021-04-23 10:58:19 +08:00
|
|
|
src/ge_dx9_texture.cpp
|
2022-07-11 12:58:03 +08:00
|
|
|
src/ge_vma.cpp
|
2022-03-19 15:14:55 +08:00
|
|
|
src/ge_vulkan_2d_renderer.cpp
|
2022-06-16 12:00:15 +08:00
|
|
|
src/ge_vulkan_camera_scene_node.cpp
|
2022-04-17 14:08:29 +08:00
|
|
|
src/ge_vulkan_command_loader.cpp
|
2022-07-10 14:48:07 +08:00
|
|
|
src/ge_vulkan_depth_texture.cpp
|
2021-06-10 01:02:24 +08:00
|
|
|
src/ge_vulkan_driver.cpp
|
2022-03-19 15:14:55 +08:00
|
|
|
src/ge_vulkan_dynamic_buffer.cpp
|
|
|
|
src/ge_vulkan_features.cpp
|
2022-05-29 12:33:06 +08:00
|
|
|
src/ge_vulkan_mesh_cache.cpp
|
2022-06-07 10:34:08 +08:00
|
|
|
src/ge_vulkan_scene_manager.cpp
|
2022-03-18 16:24:33 +08:00
|
|
|
src/ge_vulkan_shader_manager.cpp
|
2022-03-01 13:22:20 +08:00
|
|
|
src/ge_vulkan_texture.cpp
|
2021-04-17 12:44:25 +08:00
|
|
|
src/ge_gl_texture.cpp
|
2022-05-22 11:53:02 +08:00
|
|
|
src/ge_spm.cpp
|
2020-12-04 09:39:06 +08:00
|
|
|
)
|
2021-06-10 13:21:11 +08:00
|
|
|
|
|
|
|
if(NOT APPLE OR DLOPEN_MOLTENVK)
|
|
|
|
set(GE_SOURCES ${GE_SOURCES} src/vulkan.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(graphics_engine STATIC ${GE_SOURCES})
|