2019-05-27 15:15:39 +08:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2018-11-26 20:22:19 +08:00
|
|
|
|
2018-11-27 14:30:52 +08:00
|
|
|
PROJECT(ULRE)
|
2018-11-26 20:22:19 +08:00
|
|
|
|
2019-08-19 11:50:23 +08:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
2019-08-22 11:39:21 +08:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMCMakeModule)
|
2018-11-26 20:22:19 +08:00
|
|
|
|
2019-11-27 19:11:37 +08:00
|
|
|
set(ULRE_3RDPTY_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdpty)
|
|
|
|
|
2019-08-23 11:17:21 +08:00
|
|
|
include(vulkan)
|
|
|
|
|
2019-08-22 11:39:21 +08:00
|
|
|
include(math)
|
2019-11-27 19:11:37 +08:00
|
|
|
use_mgl(${ULRE_3RDPTY_ROOT_PATH}/MathGeoLib)
|
2019-08-22 11:39:21 +08:00
|
|
|
|
|
|
|
include(use_cm_module)
|
|
|
|
use_cm_module(Core)
|
2019-08-23 11:17:21 +08:00
|
|
|
use_cm_module(Platform)
|
2020-01-13 20:13:48 +08:00
|
|
|
use_cm_module(AssetsManage)
|
2018-12-05 21:08:18 +08:00
|
|
|
|
2019-04-30 17:32:50 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
2019-11-27 19:11:37 +08:00
|
|
|
include_directories(${ULRE_3RDPTY_ROOT_PATH}/jsoncpp/include)
|
2019-06-03 22:32:18 +08:00
|
|
|
add_subdirectory(3rdpty/jsoncpp)
|
2020-01-23 21:00:35 +08:00
|
|
|
SET(JSONCPP_LIBRARY jsoncpp_lib)
|
|
|
|
ELSE()
|
|
|
|
SET(JSONCPP_LIBRARY jsoncpp)
|
2018-11-30 17:25:58 +08:00
|
|
|
ENDIF()
|
|
|
|
|
2019-08-22 11:39:21 +08:00
|
|
|
SET(ULRE CMCore
|
2019-08-23 11:17:21 +08:00
|
|
|
CMPlatform
|
2020-01-13 20:13:48 +08:00
|
|
|
CMAssetsManage
|
2019-06-03 22:32:18 +08:00
|
|
|
ULRE.Util
|
2019-05-30 19:24:31 +08:00
|
|
|
ULRE.RenderDevice.Vulkan
|
|
|
|
ULRE.SceneGraph
|
|
|
|
MathGeoLib
|
|
|
|
spirv-cross-core
|
2019-08-12 20:26:12 +08:00
|
|
|
SPIRV
|
2019-08-19 10:32:25 +08:00
|
|
|
glslang
|
2020-01-23 21:00:35 +08:00
|
|
|
${JSONCPP_LIBRARY}
|
2019-05-30 19:24:31 +08:00
|
|
|
${RENDER_LIBRARY}
|
|
|
|
${Vulkan_LIBRARIES})
|
|
|
|
|
2019-11-27 19:11:37 +08:00
|
|
|
include_directories(${ULRE_3RDPTY_ROOT_PATH}/assimp/include)
|
|
|
|
include_directories(${ULRE_3RDPTY_ROOT_PATH}/NvTriStrip)
|
2019-03-22 23:04:14 +08:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
|
|
|
|
|
|
|
SET(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
2019-11-27 19:11:37 +08:00
|
|
|
SET(SPIRV_CROSS_PATH ${ULRE_3RDPTY_ROOT_PATH}/SPIRV-Cross)
|
2018-11-27 15:43:32 +08:00
|
|
|
|
2019-05-07 03:12:11 +08:00
|
|
|
include_directories(${SPIRV_CROSS_PATH})
|
|
|
|
add_subdirectory(${SPIRV_CROSS_PATH})
|
|
|
|
|
2019-08-19 10:32:25 +08:00
|
|
|
macro(glslang_pch SRCS PCHCPP)
|
|
|
|
message("use null [glslang_pch] macro")
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
include_directories(${SPIRV_CROSS_PATH}/external/glslang/glslang/Public)
|
|
|
|
add_subdirectory(${SPIRV_CROSS_PATH}/external/glslang/glslang)
|
|
|
|
|
|
|
|
include_directories(${SPIRV_CROSS_PATH}/external/glslang)
|
|
|
|
add_subdirectory(${SPIRV_CROSS_PATH}/external/glslang/SPIRV)
|
|
|
|
|
|
|
|
add_subdirectory(${SPIRV_CROSS_PATH}/external/glslang/OGLCompilersDLL)
|
|
|
|
|
2019-07-10 21:21:17 +08:00
|
|
|
SET(ULRE_RUNTIME_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
2019-05-29 22:56:16 +08:00
|
|
|
add_subdirectory(3rdpty/assimp)
|
2018-11-27 20:03:07 +08:00
|
|
|
add_subdirectory(src)
|
|
|
|
|
2018-11-27 15:43:32 +08:00
|
|
|
add_subdirectory(example)
|