Skip to content

Commit 7fcb9fb

Browse files
committed
#1: refactor the file structure
1 parent 10c6501 commit 7fcb9fb

32 files changed

+5
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ test/
1010
*.gguf
1111
output*.png
1212
models*
13-
*.log
13+
*.log
14+
.VSCodeCounter/

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ endif()
7373
set(SD_LIB stable-diffusion)
7474

7575
file(GLOB SD_LIB_SOURCES
76-
"*.h"
77-
"*.cpp"
78-
"*.hpp"
76+
"src/*.cpp"
7977
)
8078

8179
# we can get only one share lib
@@ -123,7 +121,7 @@ endif()
123121
add_subdirectory(thirdparty)
124122

125123
target_link_libraries(${SD_LIB} PUBLIC ggml zip)
126-
target_include_directories(${SD_LIB} PUBLIC . thirdparty)
124+
target_include_directories(${SD_LIB} PUBLIC include thirdparty)
127125
target_compile_features(${SD_LIB} PUBLIC cxx_std_11)
128126

129127

examples/cli/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ set(TARGET sd)
33
add_executable(${TARGET} main.cpp)
44
install(TARGETS ${TARGET} RUNTIME)
55
target_link_libraries(${TARGET} PRIVATE stable-diffusion ${CMAKE_THREAD_LIBS_INIT})
6+
target_include_directories(${TARGET} PUBLIC ${CMAKE_SOURCE_DIR}/include)
67
target_compile_features(${TARGET} PUBLIC cxx_std_11)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

model.h renamed to include/model.h

File renamed without changes.
File renamed without changes.
File renamed without changes.

rng.hpp renamed to include/rng.hpp

File renamed without changes.
File renamed without changes.
File renamed without changes.

t5.hpp renamed to include/t5.hpp

File renamed without changes.

tae.hpp renamed to include/tae.hpp

File renamed without changes.
File renamed without changes.

util.h renamed to include/util.h

File renamed without changes.

vae.hpp renamed to include/vae.hpp

File renamed without changes.
File renamed without changes.
File renamed without changes.

model.cpp renamed to src/model.cpp

File renamed without changes.
File renamed without changes.
File renamed without changes.

util.cpp renamed to src/util.cpp

File renamed without changes.

0 commit comments

Comments
 (0)