Explorar o código

V0.9.3
1、修改了External库的链接方式

Apple hai 2 semanas
pai
achega
9729c2af75
Modificáronse 3 ficheiros con 7 adicións e 6 borrados
  1. 1 1
      CMakeLists.txt
  2. 1 1
      External
  3. 5 4
      demo/ViewModel/CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -124,7 +124,7 @@ add_compile_definitions(SPDLOG_COMPILED_LIB)
 #给spdlog添加宏定义,使其支持%#等源文件相关的标志
 add_compile_definitions(SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE)
 #使用spdlog的静态库
-option(ENABLE_SPDLOG_STATIC_LIB "Enable spdlog static library" ON)
+option(ENABLE_SPDLOG_STATIC_LIB "Enable spdlog static library" OFF)
 
 
 #=========================================================

+ 1 - 1
External

@@ -1 +1 @@
-Subproject commit 81335eb933226d355c48eac68fa90f2bfce05719
+Subproject commit 44b1b143fe3609286dd597d72809be98925aa958

+ 5 - 4
demo/ViewModel/CMakeLists.txt

@@ -5,7 +5,7 @@ set(this_exe ViewModel)
 
 #包含源文件
 file(GLOB LOCAL_SRC
-    ${CMAKE_SOURCE_DIR}/External/module/Logs/*.cpp
+    # ${CMAKE_SOURCE_DIR}/External/module/Logs/*.cpp
 
     ${CMAKE_CURRENT_SOURCE_DIR}/*.qrc
     ${CMAKE_CURRENT_SOURCE_DIR}/*.rc
@@ -32,12 +32,12 @@ target_include_directories(${this_exe} PRIVATE
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_SOURCE_DIR}/External/common
     ${CMAKE_SOURCE_DIR}/External/module
-    ${CMAKE_SOURCE_DIR}/External/module/Logs
+    # ${CMAKE_SOURCE_DIR}/External/module/Logs
 
     ${CMAKE_CURRENT_SOURCE_DIR}/Base
     ${CMAKE_CURRENT_SOURCE_DIR}/Delegate
 
-    ${spdlog_INCLUDE_DIR}
+    # ${spdlog_INCLUDE_DIR}
 )
 
 target_link_libraries(${this_exe} PRIVATE
@@ -51,9 +51,10 @@ target_link_libraries(${this_exe} PRIVATE
 
 target_link_libraries(${this_exe} PRIVATE 
     # ${CURL_LIBRARY}
-    ${spdlog_LIBRARY}
+    # ${spdlog_LIBRARY}
     # ${OpenSSL-1.1.1_LIB_LIBRARY}
     # CURL::libcurl
+    spdlog::spdlog
 )
 
 if(CMAKE_CXX_COMPILER_VERSION LESS 9.0)