Skip to content

Commit

Permalink
Update: Cmakefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
i0gan committed Apr 29, 2024
1 parent 7f1956b commit 8e1748f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
cmake_minimum_required(VERSION 3.6)

project("squick")

set_property(GLOBAL PROPERTY USE_FOLDERS On)

set(SolutionDir ${PROJECT_SOURCE_DIR})
message(STATUS "SolutionDir=" ${SolutionDir})

# 链接Squick必要动态链接库
# Link basic liberay
macro(LinkSquick proName)
add_dependencies(${proName} core struct)
target_link_libraries(${proName} core struct)
endmacro(LinkSquick)


# 工程输出
# Squick project out, Included execute project or plugin project
macro(SquickOut proName outFolder outPath outName)
set_target_properties( ${proName} PROPERTIES OUTPUT_NAME ${outName} )
set_target_properties( ${proName} PROPERTIES PREFIX "")
Expand Down Expand Up @@ -41,19 +43,19 @@ set_target_properties( ${proName} PROPERTIES
endmacro(SquickOut)


# 可执行文件生成路径
# The path for builded executed files
set(SQUICK_BUILD_EXE_PATH ${SolutionDir}/bin)
# 可执行文件运行依赖动态链接库存放路径
# The path for builded executed files dependency
set(SQUICK_RUNTIME_LIB_PATH ${SolutionDir}/bin)
# 核心插件路径
# The path for builded plugin files
set(SQUICK_BUILD_PLUGIN_CORE_PATH ${SolutionDir}/bin/plugin/core)
# 服务器插件路径
# The path for builded node logic plugin files
set(SQUICK_BUILD_PLUGIN_SERVER_PATH ${SolutionDir}/bin/plugin/node)
# 拓展插件路径
# The path for builded extern plugin files
set(SQUICK_BUILD_PLUGIN_EXTEND_PATH ${SolutionDir}/bin/plugin/extend)
# 测试插件路径
# The path for builded test plugin files
set(SQUICK_BUILD_PLUGIN_SQKCLI_PATH ${SolutionDir}/bin/plugin/sqkcli)
# Tutorial plugins build path
# The path for builded tutorial plugin files
set(SQUICK_BUILD_PLUGIN_TUTORIAL_PATH ${SolutionDir}/bin/plugin/tutorial)

include_directories(
Expand Down Expand Up @@ -127,7 +129,6 @@ endif()

message("Start to build squick")


macro(source_group_by_dir source_files)
if(MSVC)
set(honcur_dir ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down

0 comments on commit 8e1748f

Please sign in to comment.