Build improvements: symlink resources properly with Visual Studio

Convert dependencies into a CMake build script in the `deps` dir
This commit is contained in:
Vojtech Kral 2018-10-12 14:19:08 +02:00
parent adf739cd45
commit 0b0e65636f
7 changed files with 459 additions and 19 deletions

View file

@ -215,7 +215,7 @@ if (NOT GLEW_FOUND)
endif ()
include_directories(${GLEW_INCLUDE_DIRS})
# Resources and l10n
# l10n
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
add_custom_target(pot
# FIXME: file list stale
@ -225,19 +225,6 @@ add_custom_target(pot
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate pot file from strings in the source tree"
)
if (MSVC)
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/src/resources" WIN_RESOURCES_SYMLINK)
add_custom_target(resources_symlink ALL
COMMAND if not exist "${WIN_RESOURCES_SYMLINK}" ( mklink /J "${WIN_RESOURCES_SYMLINK}" "${SLIC3R_RESOURCES_DIR_WIN}" )
VERBATIM
)
else ()
add_custom_target(resources_symlink ALL
COMMAND ln -sf "${SLIC3R_RESOURCES_DIR}" "${CMAKE_BINARY_DIR}/resources"
VERBATIM
)
endif()
# libslic3r, Slic3r GUI and the slic3r executable.
add_subdirectory(src)