mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 04:13:50 +00:00
Add optional & experimental support to load .psd file (only when ENABLE_PSD=on)
This commit is contained in:
parent
72cf9c12f7
commit
cf1678f4b3
@ -82,6 +82,7 @@ option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
|
||||
option(ENABLE_CLANG_TIDY "Enable static analysis" off)
|
||||
option(ENABLE_CCACHE "Use CCache to improve recompilation speed (optional)" on)
|
||||
option(ENABLE_SENTRY "Use Sentry SDK to report crashes" off)
|
||||
option(ENABLE_PSD "Enable experimental support for .psd files" off)
|
||||
set(CUSTOM_WEBSITE_URL "" CACHE STRING "Enable custom local webserver to check updates")
|
||||
|
||||
if(ENABLE_SENTRY)
|
||||
|
@ -102,7 +102,9 @@ add_subdirectory(doc)
|
||||
add_subdirectory(filters)
|
||||
add_subdirectory(fixmath)
|
||||
add_subdirectory(flic)
|
||||
add_subdirectory(psd)
|
||||
if(ENABLE_PSD)
|
||||
add_subdirectory(psd)
|
||||
endif()
|
||||
add_subdirectory(tga)
|
||||
add_subdirectory(render)
|
||||
add_subdirectory(dio)
|
||||
|
@ -91,6 +91,10 @@ if(WITH_WEBP_SUPPORT)
|
||||
add_definitions(-DASEPRITE_WITH_WEBP_SUPPORT)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PSD)
|
||||
add_definitions(-DENABLE_PSD)
|
||||
endif()
|
||||
|
||||
# libarchive definitions
|
||||
add_definitions(-DLIBARCHIVE_STATIC)
|
||||
|
||||
@ -132,12 +136,14 @@ set(file_formats
|
||||
file/jpeg_format.cpp
|
||||
file/pcx_format.cpp
|
||||
file/png_format.cpp
|
||||
file/psd_format.cpp
|
||||
file/svg_format.cpp
|
||||
file/tga_format.cpp)
|
||||
if(WITH_WEBP_SUPPORT)
|
||||
list(APPEND file_formats file/webp_format.cpp)
|
||||
endif()
|
||||
if(ENABLE_PSD)
|
||||
list(APPEND file_formats file/psd_format.cpp)
|
||||
endif()
|
||||
|
||||
set(scripting_files)
|
||||
if(ENABLE_SCRIPTING)
|
||||
@ -677,7 +683,6 @@ target_link_libraries(app-lib
|
||||
render-lib
|
||||
laf-ft
|
||||
laf-os
|
||||
psd
|
||||
ui-lib
|
||||
ver-lib
|
||||
undo
|
||||
@ -695,6 +700,10 @@ target_link_libraries(app-lib
|
||||
fmt
|
||||
tinyexpr)
|
||||
|
||||
if(ENABLE_PSD)
|
||||
target_link_libraries(app-lib psd)
|
||||
endif()
|
||||
|
||||
# Directory where generated files by "gen" utility will stay.
|
||||
target_include_directories(app-lib PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
|
@ -30,10 +30,13 @@ extern FileFormat* CreateIcoFormat();
|
||||
extern FileFormat* CreateJpegFormat();
|
||||
extern FileFormat* CreatePcxFormat();
|
||||
extern FileFormat* CreatePngFormat();
|
||||
extern FileFormat* CreatePsdFormat();
|
||||
extern FileFormat* CreateSvgFormat();
|
||||
extern FileFormat* CreateTgaFormat();
|
||||
|
||||
#ifdef ENABLE_PSD
|
||||
extern FileFormat* CreatePsdFormat();
|
||||
#endif
|
||||
|
||||
#ifdef ASEPRITE_WITH_WEBP_SUPPORT
|
||||
extern FileFormat* CreateWebPFormat();
|
||||
#endif
|
||||
@ -67,7 +70,11 @@ FileFormatsManager::FileFormatsManager()
|
||||
registerFormat(CreateJpegFormat());
|
||||
registerFormat(CreatePcxFormat());
|
||||
registerFormat(CreatePngFormat());
|
||||
|
||||
#ifdef ENABLE_PSD
|
||||
registerFormat(CreatePsdFormat());
|
||||
#endif
|
||||
|
||||
registerFormat(CreateSvgFormat());
|
||||
registerFormat(CreateTgaFormat());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user