This commit is contained in:
2026-06-16 14:20:41 +08:00
parent aaeb52173b
commit 164f18e823
4 changed files with 28 additions and 2 deletions
+20
View File
@@ -302,6 +302,26 @@ function(add_subdirectory)
endfunction()
macro(attach_current_source_dir )
get_property(_targets DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY BUILDSYSTEM_TARGETS)
foreach(target IN LISTS _targets)
get_target_property(target_type "${target}" TYPE)
if(target_type STREQUAL "INTERFACE_LIBRARY"
OR target_type STREQUAL "UTILITY"
OR target_type STREQUAL "UNKNOWN_LIBRARY"
OR target_type STREQUAL "OBJECT_LIBRARY"
# OR target_type STREQUAL "STATIC_LIBRARY"
)
#message(STATUS "skip target: ${target}, type=${target_type}")
continue()
endif()
_attach_target("${target}" "")
endforeach()
endmacro()
#/DRIVER
#/SUBSYSTEM:NATIVE
#/ENTRY:DriverEntry
+1 -1
View File
@@ -418,7 +418,7 @@ function(_add_directory_to_clion dir)
# 获取构建目录的文件名(不带扩展名)
get_filename_component(dir_name "${dir}" NAME_WE)
if(NOT EXISTS "${dir}")
message(WARNING "目录不存在,跳过: ${R}${dir}${E}")
message(FATAL_ERROR "目录不存在: ${R}${dir}${E}")
return()
endif()
+3
View File
@@ -56,9 +56,12 @@ include(${CMAKE_SOURCE_DIR}/register_project.cmake) #加载基础核心库
# 统一生成前面注册过的所有配置对象和 action target
rcl_generate_registered_cmake_libraries()
attach_current_source_dir()
message("全部加载完成!")
+4 -1
View File
@@ -45,7 +45,7 @@ if(WIN32)
endif()
if(0)
if(1)
_load_core_proj(YSGraphic_Core)
_load_sub_proj(
@@ -63,9 +63,12 @@ endif()
if(${ok})
if(NOT MINGW)
_load_core_proj(SSR)
_load_sub_proj(
ECAP_Server
)
_add_directory_to_clion(${CMAKE_SOURCE_DIR}/../projects/webapp)
endif()
else ()
message("ECAP_Server 依赖未安装!")