Add ENABLE_ASEPRITE_EXE option

This commit is contained in:
David Capello 2018-08-27 11:48:33 -03:00
parent f110132222
commit 256c00747b
2 changed files with 25 additions and 22 deletions

View File

@ -68,6 +68,7 @@ option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off)
option(USE_SHARED_FREETYPE "Use shared FreeType library" off)
option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off)
option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on)
option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)
option(ENABLE_NEWS "Enable the news in Home tab" on)
option(ENABLE_UPDATER "Enable automatic check for updates" on)

View File

@ -166,30 +166,32 @@ add_custom_target(copy_data DEPENDS ${out_data_files})
######################################################################
# Aseprite application
if(WIN32)
set(win32_resources
main/resources_win32.rc
main/settings.manifest)
if(ENABLE_ASEPRITE_EXE)
if(WIN32)
set(win32_resources
main/resources_win32.rc
main/settings.manifest)
endif()
add_executable(aseprite main/main.cpp ${win32_resources})
if(WIN32 AND ENABLE_UI)
set_target_properties(aseprite PROPERTIES WIN32_EXECUTABLE true)
endif()
target_link_libraries(aseprite app-lib)
add_dependencies(aseprite copy_data)
if(LAF_OS_BACKEND_LINK_FLAGS)
set_target_properties(aseprite PROPERTIES LINK_FLAGS
${LAF_OS_BACKEND_LINK_FLAGS})
endif()
install(TARGETS aseprite
RUNTIME DESTINATION bin)
install(DIRECTORY ../data
DESTINATION share/aseprite)
endif()
add_executable(aseprite main/main.cpp ${win32_resources})
if(WIN32 AND ENABLE_UI)
set_target_properties(aseprite PROPERTIES WIN32_EXECUTABLE true)
endif()
target_link_libraries(aseprite app-lib)
add_dependencies(aseprite copy_data)
if(LAF_OS_BACKEND_LINK_FLAGS)
set_target_properties(aseprite PROPERTIES LINK_FLAGS
${LAF_OS_BACKEND_LINK_FLAGS})
endif()
install(TARGETS aseprite
RUNTIME DESTINATION bin)
install(DIRECTORY ../data
DESTINATION share/aseprite)
######################################################################
# Tests