Normalize some cmake options from WITH_* to ENABLE_*

This commit is contained in:
David Capello 2021-12-15 17:47:44 -03:00
parent f567805591
commit 977994765c
6 changed files with 12 additions and 13 deletions

View File

@ -52,10 +52,6 @@ enable_testing()
# Options (these can be specified in cmake command line or modifying # Options (these can be specified in cmake command line or modifying
# CMakeCache.txt) # CMakeCache.txt)
option(WITH_WEBP_SUPPORT "Enable support to load/save .webp files" on)
option(WITH_DESKTOP_INTEGRATION "Enable desktop integration modules" off)
option(WITH_QT_THUMBNAILER "Enable kde5/qt5 thumnailer" off)
option(USE_SHARED_CMARK "Use your installed copy of cmark" off) option(USE_SHARED_CMARK "Use your installed copy of cmark" off)
option(USE_SHARED_CURL "Use your installed copy of curl" off) option(USE_SHARED_CURL "Use your installed copy of curl" off)
option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off) option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off)
@ -82,6 +78,9 @@ option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
option(ENABLE_CLANG_TIDY "Enable static analysis" off) option(ENABLE_CLANG_TIDY "Enable static analysis" off)
option(ENABLE_CCACHE "Use CCache to improve recompilation speed (optional)" on) option(ENABLE_CCACHE "Use CCache to improve recompilation speed (optional)" on)
option(ENABLE_SENTRY "Use Sentry SDK to report crashes" off) option(ENABLE_SENTRY "Use Sentry SDK to report crashes" off)
option(ENABLE_WEBP "Enable support to load/save .webp files" on)
option(ENABLE_DESKTOP_INTEGRATION "Enable desktop integration modules" off)
option(ENABLE_QT_THUMBNAILER "Enable kde5/qt5 thumnailer" off)
set(CUSTOM_WEBSITE_URL "" CACHE STRING "Enable custom local webserver to check updates") set(CUSTOM_WEBSITE_URL "" CACHE STRING "Enable custom local webserver to check updates")
if(ENABLE_SENTRY) if(ENABLE_SENTRY)
@ -235,7 +234,7 @@ include_directories(${PNG_INCLUDE_DIRS})
add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code
# libwebp # libwebp
if(WITH_WEBP_SUPPORT) if(ENABLE_WEBP)
set(WEBP_LIBRARIES webp webpdemux libwebpmux) set(WEBP_LIBRARIES webp webpdemux libwebpmux)
set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src) set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
include_directories(${WEBP_INCLUDE_DIR}) include_directories(${WEBP_INCLUDE_DIR})

View File

@ -130,7 +130,7 @@ if(ENABLE_STEAM)
add_subdirectory(steam) add_subdirectory(steam)
endif() endif()
if(WITH_DESKTOP_INTEGRATION) if(ENABLE_DESKTOP_INTEGRATION)
add_subdirectory(desktop) add_subdirectory(desktop)
endif() endif()

View File

@ -87,8 +87,8 @@ add_custom_command(
DEPENDS ${GEN_DEP} ${widget_files} ${string_files} "${SOURCE_DATA_DIR}/gui.xml") DEPENDS ${GEN_DEP} ${widget_files} ${string_files} "${SOURCE_DATA_DIR}/gui.xml")
list(APPEND generated_files ${output_fn}) list(APPEND generated_files ${output_fn})
if(WITH_WEBP_SUPPORT) if(ENABLE_WEBP)
add_definitions(-DASEPRITE_WITH_WEBP_SUPPORT) add_definitions(-DENABLE_WEBP)
endif() endif()
# libarchive definitions # libarchive definitions
@ -134,7 +134,7 @@ set(file_formats
file/png_format.cpp file/png_format.cpp
file/svg_format.cpp file/svg_format.cpp
file/tga_format.cpp) file/tga_format.cpp)
if(WITH_WEBP_SUPPORT) if(ENABLE_WEBP)
list(APPEND file_formats file/webp_format.cpp) list(APPEND file_formats file/webp_format.cpp)
endif() endif()

View File

@ -32,7 +32,7 @@ extern FileFormat* CreatePngFormat();
extern FileFormat* CreateSvgFormat(); extern FileFormat* CreateSvgFormat();
extern FileFormat* CreateTgaFormat(); extern FileFormat* CreateTgaFormat();
#ifdef ASEPRITE_WITH_WEBP_SUPPORT #ifdef ENABLE_WEBP
extern FileFormat* CreateWebPFormat(); extern FileFormat* CreateWebPFormat();
#endif #endif
@ -68,7 +68,7 @@ FileFormatsManager::FileFormatsManager()
registerFormat(CreateSvgFormat()); registerFormat(CreateSvgFormat());
registerFormat(CreateTgaFormat()); registerFormat(CreateTgaFormat());
#ifdef ASEPRITE_WITH_WEBP_SUPPORT #ifdef ENABLE_WEBP
registerFormat(CreateWebPFormat()); registerFormat(CreateWebPFormat());
#endif #endif
} }

View File

@ -10,6 +10,6 @@ install(PROGRAMS aseprite-thumbnailer DESTINATION bin)
install(FILES gnome/aseprite.thumbnailer DESTINATION share/thumbnailers) install(FILES gnome/aseprite.thumbnailer DESTINATION share/thumbnailers)
# Qt Thumbnailer # Qt Thumbnailer
if(WITH_QT_THUMBNAILER) if(ENABLE_QT_THUMBNAILER)
add_subdirectory(kde) add_subdirectory(kde)
endif() endif()

View File

@ -33,7 +33,7 @@ if(NOT USE_SHARED_GIFLIB)
add_subdirectory(giflib) add_subdirectory(giflib)
endif() endif()
if(WITH_WEBP_SUPPORT) if(ENABLE_WEBP)
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.") set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.") set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.")
set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.") set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.")