duktape and blipbuf moved to libs
@@ -288,6 +288,20 @@ target_include_directories(giflib
PRIVATE ${GIFLIB_DIR}
INTERFACE ${THIRDPARTY_DIR}/giflib)
+################################
+# Blipbuf
+################################
+
+add_library(blipbuf STATIC ${THIRDPARTY_DIR}/blip-buf/blip_buf.c)
+target_include_directories(blipbuf INTERFACE ${THIRDPARTY_DIR}/blip-buf)
+
+################################
+# Duktape
+################################
+
+add_library(duktape STATIC ${THIRDPARTY_DIR}/duktape/src/duktape.c)
+target_include_directories(duktape INTERFACE ${THIRDPARTY_DIR}/duktape/src)
+
################################
# TIC-80 core
################################
@@ -302,8 +316,6 @@ set(TIC80CORE_SRC
${TIC80CORE_DIR}/wrenapi.c
${TIC80CORE_DIR}/squirrelapi.c
${TIC80CORE_DIR}/ext/gif.c
- ${THIRDPARTY_DIR}/blip-buf/blip_buf.c # TODO: link it as lib?
- ${THIRDPARTY_DIR}/duktape/src/duktape.c # TODO: link it as lib?
)
add_library(tic80core STATIC ${TIC80CORE_SRC})
@@ -311,8 +323,6 @@ add_library(tic80core STATIC ${TIC80CORE_SRC})
target_include_directories(tic80core
PRIVATE
${CMAKE_SOURCE_DIR}/include
- ${THIRDPARTY_DIR}/blip-buf
- ${THIRDPARTY_DIR}/duktape/src
${THIRDPARTY_DIR}/wren/src/include
${THIRDPARTY_DIR}/squirrel/include
${THIRDPARTY_DIR}/moonscript
@@ -320,7 +330,7 @@ target_include_directories(tic80core
PUBLIC
${CMAKE_CURRENT_BINARY_DIR})
-target_link_libraries(tic80core lua lpeg wren squirrel giflib)
+target_link_libraries(tic80core lua lpeg wren squirrel giflib blipbuf duktape)
if(LINUX)
target_link_libraries(tic80core m)
