diff --git a/.gitignore b/.gitignore index 9ed92a0..4f53da8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +tags +.cache build GNUmakefile diff --git a/CMakeLists.txt b/CMakeLists.txt index 887bb43..92a33ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.27) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) project(hellocmake LANGUAGES CXX) if (NOT CMAKE_BUILD_TYPE) diff --git a/mandel.png b/mandel.png new file mode 100644 index 0000000..96c0df5 Binary files /dev/null and b/mandel.png differ diff --git a/rainbow.png b/rainbow.png new file mode 100644 index 0000000..3ecd86b Binary files /dev/null and b/rainbow.png differ diff --git a/stbiw/CMakeLists.txt b/stbiw/CMakeLists.txt index b56b853..2132d8b 100644 --- a/stbiw/CMakeLists.txt +++ b/stbiw/CMakeLists.txt @@ -1 +1,3 @@ -message(FATAL_ERROR "请修改 stbiw/CMakeLists.txt!要求生成一个名为 stbiw 的库") +add_library(stbiw STATIC stb_image_write.cpp) +target_include_directories(stbiw PUBLIC .) +#target_compile_definitions(stbiw PUBLIC -DSTB_IMAGE_WRITE_IMPLEMENTATION) diff --git a/stbiw/stb_image_write.cpp b/stbiw/stb_image_write.cpp new file mode 100644 index 0000000..f25fa1b --- /dev/null +++ b/stbiw/stb_image_write.cpp @@ -0,0 +1,2 @@ +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include