2022-07-19 17:34:21 +00:00
|
|
|
find_package(Vulkan REQUIRED)
|
2022-11-26 13:22:36 +00:00
|
|
|
find_package(SDL2 CONFIG REQUIRED)
|
|
|
|
find_package(imgui REQUIRED)
|
2022-07-19 17:34:21 +00:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2022-11-26 13:22:36 +00:00
|
|
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
2022-07-19 17:34:21 +00:00
|
|
|
|
2022-11-26 13:22:36 +00:00
|
|
|
FILE(GLOB_RECURSE SOURCES
|
|
|
|
core/src/*.cpp
|
|
|
|
shadow-renderer/src/*.cpp
|
|
|
|
shadow-reflection/src/*.cpp
|
2022-11-26 16:44:16 +00:00
|
|
|
shadow-utility/src/*.cpp
|
2023-03-13 15:25:31 +00:00
|
|
|
shadow-assets/src/*.cpp
|
2022-11-26 13:22:36 +00:00
|
|
|
)
|
|
|
|
FILE(GLOB_RECURSE HEADERS
|
|
|
|
core/inc/*.h
|
|
|
|
shadow-renderer/inc/*.h
|
|
|
|
shadow-reflection/inc/*.h
|
2022-11-26 16:44:16 +00:00
|
|
|
shadow-utility/inc/*.h
|
2023-03-13 15:25:31 +00:00
|
|
|
shadow-assets/src/*.h
|
2022-11-26 13:22:36 +00:00
|
|
|
)
|
2022-07-19 17:34:21 +00:00
|
|
|
|
2022-11-26 13:22:36 +00:00
|
|
|
add_library(shadow-engine SHARED ${SOURCES} $<TARGET_OBJECTS:imgui>)
|
|
|
|
|
|
|
|
target_include_directories(shadow-engine
|
|
|
|
PRIVATE ${SDL2_INCLUDE_DIRS}
|
|
|
|
PUBLIC
|
|
|
|
core/inc
|
|
|
|
shadow-renderer/inc
|
|
|
|
shadow-reflection/inc
|
2022-11-26 16:44:16 +00:00
|
|
|
shadow-utility/inc
|
2023-03-13 15:25:31 +00:00
|
|
|
shadow-assets/src
|
2022-11-26 13:22:36 +00:00
|
|
|
${glm_SOURCE_DIR}
|
|
|
|
INTERFACE
|
|
|
|
${imgui_SOURCE_DIR}
|
|
|
|
${imgui_SOURCE_DIR}/backends)
|
|
|
|
|
|
|
|
target_link_libraries(shadow-engine
|
|
|
|
PUBLIC Vulkan::Vulkan SDL2::SDL2 spdlog dylib imgui
|
|
|
|
)
|
|
|
|
target_compile_definitions(shadow-engine PRIVATE "EXPORTING_SH_ENGINE")
|
|
|
|
|
|
|
|
target_link_options(shadow-engine PUBLIC -Wl,--export-all-symbols)
|
2022-07-19 17:34:21 +00:00
|
|
|
|