We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b8da69 commit 3a4ef46Copy full SHA for 3a4ef46
2 files changed
3rdparty/stb_image_wrapper.cpp
cmake/stb.cmake
@@ -1,8 +1,12 @@
1
include_guard()
2
3
function(ppc_link_stb exec_func_lib)
4
- add_library(stb_image STATIC
5
- ${CMAKE_SOURCE_DIR}/3rdparty/stb_image_wrapper.cpp)
6
- target_include_directories(stb_image PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty/stb)
+ set(stb_image_header ${CMAKE_SOURCE_DIR}/3rdparty/stb/stb_image.h)
+
+ add_library(stb_image STATIC ${stb_image_header})
7
+ set_source_files_properties(${stb_image_header} PROPERTIES LANGUAGE C)
8
+ set_target_properties(stb_image PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
9
+ target_compile_definitions(stb_image PRIVATE STB_IMAGE_IMPLEMENTATION)
10
+ target_include_directories(stb_image PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty)
11
target_link_libraries(${exec_func_lib} PUBLIC stb_image)
12
endfunction()
0 commit comments