Use the LAF_OS_BACKEND variable

This commit is contained in:
David Capello 2018-08-09 17:51:00 -03:00
parent 86cd2fd085
commit 3977631924
2 changed files with 4 additions and 7 deletions

View File

@ -82,12 +82,9 @@ option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
set(CUSTOM_WEBSITE_URL "" CACHE STRING "Enable custom local webserver to check updates")
if(NOT ENABLE_UI)
# Without UI, don't use back-ends
set(USE_SKIA_BACKEND off)
set(USE_NONE_BACKEND on)
set(LAF_OS_BACKEND "none") # Without UI, we use the none backend
else()
set(USE_SKIA_BACKEND on)
set(USE_NONE_BACKEND off)
set(LAF_OS_BACKEND "skia")
endif()
# Check valid gtk + libpng combination

View File

@ -12,7 +12,7 @@ endif()
if(MSVC)
# As Skia is compiled with /GL flag (whole program optimization),
# the linker prefer a /LTCG parameter to improve link times.
if(USE_SKIA_BACKEND)
if(LAF_OS_BACKEND STREQUAL "skia")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
endif()
@ -181,7 +181,7 @@ add_dependencies(aseprite copy_data)
if(MSVC)
if(ENABLE_UI)
if(USE_SKIA_BACKEND)
if(LAF_OS_BACKEND STREQUAL "skia")
# Linking with "wsetargv.obj" to add support to expand filename
# wildcards in argc/argv.
set_target_properties(aseprite