Skip to content

Commit 0dd5fc7

Browse files
authored
Update CMakeLists.txt
使用add_library是用来生成stbiw静态库的。 使用target_include_directories指定了stbiw库关联了当前目录(即/stbiw),且使用了public关键字,这将会传递给所有与stbiw库关联的文件,这些被关联的文件也会到/stbiw目录中去寻找可能需要的头文件。
1 parent b3d6555 commit 0dd5fc7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stbiw/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
message(FATAL_ERROR "请修改 stbiw/CMakeLists.txt!要求生成一个名为 stbiw 的库")
2+
add_library(stbiw STATIC stb_image_write.cpp)
3+
target_include_directories(stbiw PUBLIC .)

0 commit comments

Comments
 (0)