mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-07-01 19:55:54 +08:00
fix: 修复PR#5 review意见
- CMakeLists.txt: 启用RC语言, 移除冗余_WIN32, 添加DLL复制 - CLAUDE.md: 更新构建命令为CMake - README.md: 移除硬编码MinGW路径和Makefile引用 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+23
-2
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(PathEditor LANGUAGES C)
|
||||
project(PathEditor LANGUAGES C RC)
|
||||
|
||||
set(IUP_DIR "${CMAKE_SOURCE_DIR}/libs/iup-3.31_Win64_dllw6_lib")
|
||||
|
||||
@@ -22,7 +22,7 @@ target_link_libraries(PathEditor
|
||||
iup iupcd gdi32 comdlg32 comctl32 uuid ole32 advapi32
|
||||
)
|
||||
|
||||
target_compile_definitions(PathEditor PRIVATE _WIN32 UNICODE _UNICODE)
|
||||
target_compile_definitions(PathEditor PRIVATE UNICODE _UNICODE)
|
||||
|
||||
target_compile_options(PathEditor PRIVATE -Wall -O2 -fexec-charset=UTF-8)
|
||||
|
||||
@@ -31,3 +31,24 @@ target_link_options(PathEditor PRIVATE -mwindows)
|
||||
set_target_properties(PathEditor PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin"
|
||||
)
|
||||
|
||||
add_custom_command(TARGET PathEditor POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${IUP_DIR}/iup.dll"
|
||||
"${IUP_DIR}/iupcd.dll"
|
||||
"${IUP_DIR}/freetype6.dll"
|
||||
"${IUP_DIR}/ftgl.dll"
|
||||
"${IUP_DIR}/zlib1.dll"
|
||||
"${IUP_DIR}/iupcontrols.dll"
|
||||
"${IUP_DIR}/iupim.dll"
|
||||
"${IUP_DIR}/iupimglib.dll"
|
||||
"${IUP_DIR}/iup_mglplot.dll"
|
||||
"${IUP_DIR}/iup_plot.dll"
|
||||
"${IUP_DIR}/iup_scintilla.dll"
|
||||
"${IUP_DIR}/iupgl.dll"
|
||||
"${IUP_DIR}/iupglcontrols.dll"
|
||||
"${IUP_DIR}/iupole.dll"
|
||||
"${IUP_DIR}/iuptuio.dll"
|
||||
"${CMAKE_SOURCE_DIR}/bin/"
|
||||
COMMENT "Copying IUP runtime DLLs to bin/"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user