2018-11-27 15:43:32 +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
|
|
|
|
|
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|
|
|
|
|
|
|
|
|
include(system_bit)
|
|
|
|
|
include(version)
|
|
|
|
|
include(compiler)
|
|
|
|
|
include(output_path)
|
2019-04-09 02:33:15 +08:00
|
|
|
|
include(FindVulkan)
|
2018-11-26 20:22:19 +08:00
|
|
|
|
|
|
|
|
|
check_system_bits()
|
|
|
|
|
check_system_version()
|
|
|
|
|
set_compiler_param()
|
|
|
|
|
set_output_directory()
|
|
|
|
|
|
2019-04-25 21:57:37 +08:00
|
|
|
|
|
2018-11-30 17:25:58 +08:00
|
|
|
|
IF(WIN32)
|
|
|
|
|
add_subdirectory(3rdpty/glfw)
|
|
|
|
|
include_directories(3rdpty/glfw/include)
|
2018-12-05 21:08:18 +08:00
|
|
|
|
|
2019-04-09 02:33:15 +08:00
|
|
|
|
include_directories(${Vulkan_INCLUDE_DIRS})
|
2019-04-25 21:57:37 +08:00
|
|
|
|
|
|
|
|
|
SET(SPIRV_CROSS_PATH 3rdpty/SPIRV-Cross)
|
|
|
|
|
include_directories(${SPIRV_CROSS_PATH})
|
|
|
|
|
add_subdirectory(${SPIRV_CROSS_PATH})
|
2019-04-09 00:22:26 +08:00
|
|
|
|
|
2019-04-09 02:33:15 +08:00
|
|
|
|
SET(OPENGL_LIB opengl32)
|
2018-11-30 17:25:58 +08:00
|
|
|
|
ELSE()
|
|
|
|
|
SET(OPENGL_LIB GL)
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
2019-04-09 02:33:15 +08:00
|
|
|
|
SET(VULKAN_LIB ${Vulkan_LIBRARIES})
|
|
|
|
|
|
2018-12-08 21:43:00 +08:00
|
|
|
|
add_definitions(-DMATH_USE_OPENGL)
|
|
|
|
|
add_definitions(-DMATH_RIGHTHANDED_CAMERA)
|
|
|
|
|
add_definitions(-DMATH_AVX)
|
|
|
|
|
|
2019-03-22 23:04:14 +08:00
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/MathGeoLib/src)
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpty/GLEWCore/inc)
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
|
|
|
|
|
2019-04-09 02:33:15 +08:00
|
|
|
|
|
2019-03-22 23:04:14 +08:00
|
|
|
|
SET(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
2018-11-27 15:43:32 +08:00
|
|
|
|
|
2018-11-27 14:30:52 +08:00
|
|
|
|
add_subdirectory(3rdpty/MathGeoLib)
|
2018-11-30 16:10:41 +08:00
|
|
|
|
add_subdirectory(3rdpty/GLEWCore)
|
2018-11-27 20:03:07 +08:00
|
|
|
|
add_subdirectory(src)
|
|
|
|
|
|
2018-12-05 21:08:18 +08:00
|
|
|
|
SET(ULRE ULRE.Base
|
|
|
|
|
ULRE.RenderDevice
|
2018-11-30 13:57:57 +08:00
|
|
|
|
ULRE.RenderDriver
|
2018-12-05 21:08:18 +08:00
|
|
|
|
ULRE.Platform
|
2018-11-30 13:57:57 +08:00
|
|
|
|
MathGeoLib
|
2018-11-30 16:10:41 +08:00
|
|
|
|
GLEWCore
|
2018-11-30 13:57:57 +08:00
|
|
|
|
glfw
|
2018-11-30 17:25:58 +08:00
|
|
|
|
${OPENGL_LIB})
|
2018-11-30 13:57:57 +08:00
|
|
|
|
|
2018-11-27 15:43:32 +08:00
|
|
|
|
add_subdirectory(example)
|