ULRE/CMakeLists.txt

71 lines
1.8 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.0)
2018-11-26 20:22:19 +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)
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)
include(vulkan)
include(math)
2019-11-27 19:11:37 +08:00
use_mgl(${ULRE_3RDPTY_ROOT_PATH}/MathGeoLib)
include(use_cm_module)
use_cm_module(Core)
use_cm_module(Platform)
2020-01-13 20:13:48 +08:00
use_cm_module(AssetsManage)
2018-12-05 21:08:18 +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)
ENDIF()
SET(ULRE CMCore
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
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)
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
include_directories(${SPIRV_CROSS_PATH})
add_subdirectory(${SPIRV_CROSS_PATH})
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)
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)