增加生成动态库配置

This commit is contained in:
bmy
2024-05-21 15:06:18 +08:00
parent 76ea73bae2
commit 6b0b279835
2 changed files with 3 additions and 1 deletions

View File

@@ -6,5 +6,6 @@
"by_serial.h": "c", "by_serial.h": "c",
"log.h": "c", "log.h": "c",
"termios.h": "c" "termios.h": "c"
} },
"cmake.configureOnOpen": true
} }

View File

@@ -15,6 +15,7 @@ set(LOGC logc/log.c)
# add_library(bycmd ${BYCMD} ${FRAME} ${CRC16}) # add_library(bycmd ${BYCMD} ${FRAME} ${CRC16})
# add_executable(${test} ${TEST_MAIN} ${FRAME}) # add_executable(${test} ${TEST_MAIN} ${FRAME})
add_executable(bycmd_test ${BYCMD} ${TOML} ${CRC16} ${LOGC} ${TEST_MAIN}) add_executable(bycmd_test ${BYCMD} ${TOML} ${CRC16} ${LOGC} ${TEST_MAIN})
add_library(bycmd SHARED ${BYCMD} ${TOML} ${CRC16} ${LOGC})
target_link_libraries(bycmd_test pthread) target_link_libraries(bycmd_test pthread)
# target_link_libraries(${test} bycmd) # target_link_libraries(${test} bycmd)