Dize
Dize
I try to use vcpkg + cmake to import osgQt to my project. **To Reproduce** First use vcpkg to install osgQt `vcpkg install osgQt:x64-windows` then wirte the following information into...
关于stbi 宏定义设计: 这是一种heard only 的设计方式。用IMPLEMENTATION宏来控制是否导入函数的定义。 没有定义IMPLEMENTATION宏时,导入stbi头文件,只有函数的声明。 我们只在stbiw的stb_image_write.cpp中,导入IMPLEMENTATION宏,以启用stbi函数的定义。 ``` C++ #define STB_IMAGE_WRITE_IMPLEMENTATION #include ``` 然后将stbiw编译成一个静态库 ``` CMake add_library(stbiw STATIC stb_image_write.cpp stb_image_write.h) target_include_directories(stbiw PUBLIC .) ``` 其他项目通过add_subdirectory就可以使用stbiw库了