feat: cmake improvements and simple ci (#9)

* move main and stb-libs to subfolder

* cmake : general additions

* ci : add simple building

---------

Co-authored-by: leejet <31925346+leejet@users.noreply.github.com>
This commit is contained in:
Erik Scholz
2023-08-17 15:09:57 +02:00
committed by GitHub
parent 8f34dd7cc7
commit 844351c417
7 changed files with 143 additions and 8 deletions

8
examples/CMakeLists.txt Normal file
View File

@@ -0,0 +1,8 @@
# TODO: move into its own subdirectoy
# TODO: make stb libs a target (maybe common)
set(SD_TARGET sd)
add_executable(${SD_TARGET} main.cpp stb_image.h stb_image_write.h)
install(TARGETS ${SD_TARGET} RUNTIME)
target_link_libraries(${SD_TARGET} PRIVATE stable-diffusion ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${SD_TARGET} PUBLIC cxx_std_11)