cmake: symlink Content instead of copying (#1162)
This commit is contained in:
+11
-6
@@ -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)
|
||||
|
||||
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user