cmakelists.txt

来自「nandflash文件系统源代码」· 文本 代码 · 共 63 行

TXT
63
字号
# Build the tools libraryset (lib_srcs    MonUtils.cc    KfsCd.cc    KfsChangeReplication.cc    KfsCp.cc    KfsLs.cc    KfsMkdirs.cc    KfsMv.cc    KfsRm.cc    KfsRmdir.cc    KfsPwd.cc    KfsFstat.cc    utils.cc)add_library (tools STATIC ${lib_srcs})add_library (tools-shared SHARED ${lib_srcs})set_target_properties (tools-shared PROPERTIES OUTPUT_NAME "tools")set_target_properties (tools PROPERTIES CLEAN_DIRECT_OUTPUT 1)set_target_properties (tools-shared PROPERTIES CLEAN_DIRECT_OUTPUT 1)add_dependencies (tools kfsClient)add_dependencies (tools-shared kfsClient-shared)set (exe_filescptokfscpfromkfskfsshellkfspingkfstogglewormkfsputkfsstatskfsfileenumkfsdataverifykfsretire)if (APPLE)   target_link_libraries(tools-shared kfsClient-shared kfsCommon-shared)endif (APPLE)## Every executable depends on its namesake source with _main.cc#foreach (exe_file ${exe_files})        add_executable (${exe_file} ${exe_file}_main.cc)        if (USE_STATIC_LIB_LINKAGE)                add_dependencies (${exe_file} tools)                target_link_libraries (${exe_file} tools kfsClient)        else (USE_STATIC_LIB_LINKAGE)                add_dependencies (${exe_file} tools-shared)                target_link_libraries (${exe_file} tools-shared kfsClient-shared)        endif (USE_STATIC_LIB_LINKAGE)endforeach (exe_file)#install (TARGETS ${exe_files} tools tools-shared        RUNTIME DESTINATION bin/tools        LIBRARY DESTINATION lib        ARCHIVE DESTINATION lib/static)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?