]> Zhao Yanbai Git Server - acecode.git/commitdiff
...
authorAceVest <zhaoyanbai@126.com>
Fri, 27 Jul 2018 10:57:22 +0000 (18:57 +0800)
committerAceVest <zhaoyanbai@126.com>
Fri, 27 Jul 2018 10:57:22 +0000 (18:57 +0800)
rtos/CMakeLists.txt
rtos/components/CMakeLists.txt
rtos/components/utils/CMakeLists.txt

index 6ea8a8b27d5881b6410ab34d27e60bf6bf10fd28..bdb739b26aecf9a1398aae8b730aa0ad799e6cf0 100644 (file)
@@ -7,7 +7,6 @@ SET(RTOS_VERSION_MINOR 1)
 PROJECT(rtos)
 ENABLE_LANGUAGE(ASM)
 
-
 CONFIGURE_FILE(
        "${PROJECT_SOURCE_DIR}/rtos_config.h.in"
        "${PROJECT_BINARY_DIR}/rtos_config.h"
@@ -24,4 +23,4 @@ ADD_EXECUTABLE(rtos rtos.c)
 
 
 # TARGET_LINK_LIBRARIES 参数里 debug optimized general 是关键词,不能用
-TARGET_LINK_LIBRARIES(rtos utils)
+TARGET_LINK_LIBRARIES(rtos components)
index 674c9a177ee8e62b9c056c60f5340d125a7604a8..973553691b164afcb61baeefdc16fa339298a378 100644 (file)
@@ -1 +1,2 @@
 ADD_SUBDIRECTORY(utils)
+ADD_LIBRARY(components $<TARGET_OBJECTS:utils_object>)
index 3328262f21ec34c6fe6a6eb0c6cb9a29b42c7dc6..0728f1bc603941ad45660f18c17cd299b7360c00 100644 (file)
@@ -1,5 +1,6 @@
-ADD_LIBRARY(utils STATIC
+SET(utils_sources
        debug.c
        debug.S
 )
-
+ADD_LIBRARY(utils_object OBJECT ${utils_sources})
+ADD_LIBRARY(utils        STATIC ${utils_sources})