File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,15 @@ if(SD_FLASH_ATTN)
5151 add_definitions (-DSD_USE_FLASH_ATTENTION)
5252endif ()
5353
54+ set (SD_LIB stable-diffusion)
55+
56+ add_library (${SD_LIB} stable-diffusion.h stable-diffusion.cpp model.h model.cpp util.h util.cpp upscaler.cpp
57+ ggml_extend.hpp clip.hpp common.hpp unet.hpp tae.hpp esrgan.hpp lora.hpp denoiser.hpp rng.hpp rng_philox.hpp)
58+
5459if (BUILD_SHARED_LIBS )
5560 message ("Build shared library" )
5661 add_definitions (-DSD_BUILD_SHARED_LIB)
57- add_definitions ( -DSD_BUILD_DLL)
62+ target_compile_definitions ( ${SD_LIB} PRIVATE -DSD_BUILD_DLL)
5863 set (CMAKE_POSITION_INDEPENDENT_CODE ON )
5964else ()
6065 message ("Build static library" )
@@ -67,10 +72,6 @@ add_subdirectory(ggml)
6772
6873add_subdirectory (thirdparty)
6974
70- set (SD_LIB stable-diffusion)
71-
72- add_library (${SD_LIB} stable-diffusion.h stable-diffusion.cpp model.h model.cpp util.h util.cpp upscaler.cpp
73- ggml_extend.hpp clip.hpp common.hpp unet.hpp tae.hpp esrgan.hpp lora.hpp denoiser.hpp rng.hpp rng_philox.hpp)
7475target_link_libraries (${SD_LIB} PUBLIC ggml zip)
7576target_include_directories (${SD_LIB} PUBLIC . thirdparty)
7677target_compile_features (${SD_LIB} PUBLIC cxx_std_11)
You can’t perform that action at this time.
0 commit comments