deleted jsoncpp/glm/expat submodules and then use vcpkg on Windows.
This commit is contained in:
parent
ebffc78fae
commit
1f0903ed91
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,6 +1,3 @@
|
||||
[submodule "3rdpty/jsoncpp"]
|
||||
path = 3rdpty/jsoncpp
|
||||
url = https://github.com/open-source-parsers/jsoncpp
|
||||
[submodule "CMCMakeModule"]
|
||||
path = CMCMakeModule
|
||||
url = https://github.com/hyzboy/CMCMakeModule
|
||||
@ -22,6 +19,3 @@
|
||||
[submodule "CMUtil"]
|
||||
path = CMUtil
|
||||
url = https://github.com/hyzboy/CMUtil.git
|
||||
[submodule "3rdpty/glm"]
|
||||
path = 3rdpty/glm
|
||||
url = https://github.com/g-truc/glm.git
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 6ad79aae3eb5bf809c30bf1168171e9e55857e45
|
@ -1 +0,0 @@
|
||||
Subproject commit 94a6220f7c738d6711d325fd29bb8a60b97fd77e
|
48
BUILD.md
Normal file
48
BUILD.md
Normal file
@ -0,0 +1,48 @@
|
||||
# Build on Windows
|
||||
|
||||
Tested with Visual Studio 2019/2022 and Windows 11
|
||||
|
||||
please first install [Git](https://git-scm.com/download/win) and [CMake](https://cmake.org/download/)
|
||||
|
||||
and then clone [vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2022) by git:
|
||||
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
bootstrap-vcpkg.bat
|
||||
|
||||
|
||||
Install [vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2022) to build required libraries:
|
||||
|
||||
vcpkg install glm:x64-windows jsoncpp:x64-windows expat:x64-windows
|
||||
vcpkg integrate install
|
||||
|
||||
finish step you can use "cmake" create project file with vcpkg toolchain:
|
||||
|
||||
cmake . -DCMAKE_TOOLCHAIN_FILE=\????\vcpkg\scripts\buildsystems\vcpkg.cmake
|
||||
|
||||
or use "cmake-gui" with "Specify toolchain file for cross-compiling."
|
||||
|
||||
#
|
||||
|
||||
# 在Windows下编译工程
|
||||
|
||||
以下在Windows 11以及Visual Studio 2019/2022下测试通过
|
||||
|
||||
首先请安装[Git](https://git-scm.com/download/win)和[CMake](https://cmake.org/download/)
|
||||
|
||||
然后使用git安装[vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2022)
|
||||
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
bootstrap-vcpkg.bat
|
||||
|
||||
接着使用[vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2022)来安装我们所需要的第三方依赖库:
|
||||
|
||||
vcpkg install glm:x64-windows jsoncpp:x64-windows expat:x64-windows
|
||||
vcpkg integrate install
|
||||
|
||||
最后你就可以使用CMake创建工程文件了:
|
||||
|
||||
cmake . -DCMAKE_TOOLCHAIN_FILE=\????\vcpkg\scripts\buildsystems\vcpkg.cmake
|
||||
|
||||
或是使用cmake-gui以图形界面形式创建,但请在第一个界面选择“Specify toolchain file for cross-compiling”并指定使用vcpkg.cmake做为工具链。
|
2
CMUtil
2
CMUtil
@ -1 +1 @@
|
||||
Subproject commit be9122db80512d3c046fe68b3b9948dd2078dec7
|
||||
Subproject commit ea20632a05ea458664cb00e92d2a0cff46cb626d
|
@ -8,12 +8,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMCMakeModule)
|
||||
|
||||
set(ULRE_3RDPTY_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdpty)
|
||||
|
||||
include(vulkan)
|
||||
|
||||
include(math)
|
||||
use_glm(${ULRE_3RDPTY_ROOT_PATH}/glm)
|
||||
|
||||
include(vulkan)
|
||||
include(use_cm_module)
|
||||
|
||||
use_cm_module(Core)
|
||||
use_cm_module(Util)
|
||||
use_cm_module(Platform)
|
||||
@ -22,14 +20,6 @@ use_cm_module(SceneGraph)
|
||||
|
||||
OPTION(SUPPORT_QT_VULKAN OFF)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
include_directories(${ULRE_3RDPTY_ROOT_PATH}/jsoncpp/include)
|
||||
add_subdirectory(3rdpty/jsoncpp)
|
||||
SET(JSONCPP_LIBRARY jsoncpp_lib)
|
||||
ELSE()
|
||||
SET(JSONCPP_LIBRARY jsoncpp)
|
||||
ENDIF()
|
||||
|
||||
SET(ULRE CMCore
|
||||
CMPlatform
|
||||
CMAssetsManage
|
||||
|
@ -9,7 +9,7 @@ Platform: Windows,Linux (WIP: Android)
|
||||
|
||||
Graphics API: Vulkan
|
||||
|
||||
|
||||
#
|
||||
ULRE是一个试验性质的工程,用于试验各种渲染相关的技术,以及做一些范例。在未来它的复杂化版本会被整合到CMGameEngine中,用于替代旧的渲染引擎。
|
||||
|
||||
平台: Windows,Linux (开发中: Android)
|
||||
|
@ -160,6 +160,8 @@ private: //texture
|
||||
bool CommitTexture2DMipmaps (Texture2D *,GPUBuffer *buf,uint32_t width,uint32_t height,uint32_t);
|
||||
bool CommitTexture2D (Texture2D *,GPUBuffer *buf,const VkBufferImageCopy *,const int count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
|
||||
|
||||
bool SubmitTexture (const VkCommandBuffer *cmd_bufs,const uint32_t count=1); ///<提交纹理处理到队列
|
||||
|
||||
public: //Texture
|
||||
|
||||
bool CheckFormatSupport(const VkFormat,const uint32_t bits,ImageTiling tiling=ImageTiling::Optimal)const;
|
||||
@ -243,8 +245,6 @@ public: //FrameBuffer相关
|
||||
|
||||
public:
|
||||
|
||||
bool SubmitTexture (const VkCommandBuffer *cmd_bufs,const uint32_t count=1); ///<提交纹理处理到队列
|
||||
|
||||
RenderTarget *CreateRenderTarget( const FramebufferInfo *fbi,RenderPass *,const uint32_t fence_count=1);
|
||||
RenderTarget *CreateRenderTarget( const FramebufferInfo *fbi,const uint32_t fence_count=1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user