cmake: symlink Content instead of copying (#1162)

This commit is contained in:
Dennis Brakhane
2025-07-18 07:55:44 +02:00
committed by GitHub
parent 6b6d8abdfd
commit 1ab37777d3
2 changed files with 11 additions and 21 deletions
+11 -6
View File
@@ -86,19 +86,24 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
$<$<COMPILE_LANGUAGE:CXX>:-Werror=delete-non-virtual-dtor>
-Werror
# some GCC versions have bugs triggering this warning
-Wno-stringop-overflow
# this is just silly
-Wno-format-zero-length
# some GCC versions have bugs triggering this warning
-Wno-stringop-overflow
# this is just silly
-Wno-format-zero-length
#uncomment this to stop the compilation at the first error
#uncomment this to stop the compilation at the first error
# -Wfatal-errors
)
endif()
add_subdirectory(WickedEngine)
add_subdirectory(Content)
add_custom_target(Content
COMMAND ${CMAKE_COMMAND} -E rm -rf ${CMAKE_CURRENT_BINARY_DIR}/Content
COMMAND ${CMAKE_COMMAND} -E create_symlink ${WICKED_ROOT_DIR}/Content ${CMAKE_CURRENT_BINARY_DIR}/Content
COMMENT "Symlinking Content directory"
VERBATIM
)
if (WICKED_EDITOR)
add_subdirectory(Editor)
-15
View File
@@ -1,15 +0,0 @@
cmake_minimum_required(VERSION 3.19)
if(CMAKE_VERSION VERSION_LESS "3.26.0")
set(COPY_DIR_CMD copy_directory)
else()
set(COPY_DIR_CMD copy_directory_if_different)
endif()
add_custom_target(Content
COMMAND ${CMAKE_COMMAND} -E ${COPY_DIR_CMD}
${WICKED_ROOT_DIR}/Content
${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Copying Content"
VERBATIM
)