Skip to content

Commit

Permalink
fix: cmake源目录的符号链接存在时不重复创建
Browse files Browse the repository at this point in the history
  • Loading branch information
Krimiston committed Feb 24, 2023
1 parent e1455e6 commit 40ef548
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ set(RGM_FULLVERSION "${RGM_VERSION_STRING} (${RGM_REVISION_DATE} revision ${RGM_

# 目录连接
set(SRC_DIR "src")
file(CREATE_LINK
"${CMAKE_CURRENT_SOURCE_DIR}/${SRC_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/${SRC_DIR}"
SYMBOLIC
)
if(NOT EXISTS ${SRC_DIR})
file(CREATE_LINK
"${CMAKE_CURRENT_SOURCE_DIR}/${SRC_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/${SRC_DIR}"
SYMBOLIC
)
endif()
# RGM
add_executable(Game)
aux_source_directory(${SRC_DIR} SRC_LIST)
Expand Down

0 comments on commit 40ef548

Please sign in to comment.