-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
czyt
committed
Nov 9, 2024
1 parent
368d529
commit 46539fc
Showing
2 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(rime-deploy C) | ||
|
||
# 设置 C 标准 | ||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_C_STANDARD_REQUIRED ON) | ||
|
||
# 添加源文件 | ||
file(GLOB SOURCES "src/*.c") | ||
|
||
# 创建可执行文件 | ||
add_executable(rime-deploy ${SOURCES}) | ||
|
||
# 添加头文件目录 | ||
target_include_directories(rime-deploy PRIVATE src) | ||
|
||
# 设置输出目录 | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | ||
|
||
# 根据平台添加特定的链接库 | ||
if(WIN32) | ||
target_link_libraries(rime-deploy PRIVATE ws2_32) | ||
elseif(UNIX) | ||
target_link_libraries(rime-deploy PRIVATE m) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters