From 5a06ffbab9447c2adc99c778e25532c0b308cee2 Mon Sep 17 00:00:00 2001 From: WangYuHang-cmd <377374481@qq.com> Date: Mon, 6 Mar 2023 22:06:14 +0800 Subject: [PATCH 1/3] Modified README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index accbceb..4d2511d 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,7 @@ target_compile_definitions(stbiw PUBLIC -DSTB_IMAGE_WRITE_IMPLEMENTATION) ``` 是不行的,因为 mandel.cpp 和 rainbow.cpp 两个文件都 include 了 stb_image_write.h, 这样同一个函数会被定义两遍! + + + +wyh开始做作业了! From e0457daebc560a216e6e98772a5252a8ce7f21b9 Mon Sep 17 00:00:00 2001 From: WangYuHang-cmd <377374481@qq.com> Date: Mon, 6 Mar 2023 22:10:39 +0800 Subject: [PATCH 2/3] Modified README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d2511d..b2c14c0 100644 --- a/README.md +++ b/README.md @@ -46,4 +46,4 @@ target_compile_definitions(stbiw PUBLIC -DSTB_IMAGE_WRITE_IMPLEMENTATION) -wyh开始做作业了! +2023/3/6 From b065851978989d19b20b55ce17a07133e476f2f6 Mon Sep 17 00:00:00 2001 From: WangYuHang-cmd <377374481@qq.com> Date: Tue, 7 Mar 2023 22:50:47 +0800 Subject: [PATCH 3/3] Modified README.md --- README.md | 29 +++++++++++++++++++++++++++++ stbiw/CMakeLists.txt | 14 +++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b2c14c0..a7b34c3 100644 --- a/README.md +++ b/README.md @@ -47,3 +47,32 @@ target_compile_definitions(stbiw PUBLIC -DSTB_IMAGE_WRITE_IMPLEMENTATION) 2023/3/6 + +提交pr的方式: + +```powershell +# 先进行修改 +git push - a +# 在文件内下面添加 Modified README.md +git checkout -b [分支名] +git push origin [分支名] +# 打开remote中的网址 https://github.com/WangYuHang-cmd/xxx/pull/new/xxx +``` + + + +```cmake +# add_library(stbiw STATIC stbiw) +# target_include_directories(stbiw PUBLIC .) +``` + + + +我的方案: + +```cmake +aux_source_directory(NEEDED DIR_STBIW) +add_library(stbiw STATIC ${DIR_STBIW}) +target_include_directories(stbiw PUBLIC .) +``` + diff --git a/stbiw/CMakeLists.txt b/stbiw/CMakeLists.txt index b56b853..19a80de 100644 --- a/stbiw/CMakeLists.txt +++ b/stbiw/CMakeLists.txt @@ -1 +1,13 @@ -message(FATAL_ERROR "请修改 stbiw/CMakeLists.txt!要求生成一个名为 stbiw 的库") +# message(FATAL_ERROR "请修改 stbiw/CMakeLists.txt!要求生成一个名为 stbiw 的库") +cmake_minimum_required(VERSION 3.10) + +set(CMAKE_C_COMPILER "gcc") +set(CMAKE_CXX_COMPILER "g++") + + +aux_source_directory(NEEDED DIR_STBIW) +add_library(stbiw STATIC ${DIR_STBIW}) +target_include_directories(stbiw PUBLIC .) + + +