# lib/CMakeLists.txt add_library( slate STATIC ) target_sources( slate PRIVATE addguidecommand.cpp addguidecommand.h addlayercommand.cpp addlayercommand.h animationplayback.cpp animationplayback.h applicationsettings.cpp applicationsettings.h applygreedypixelfillcommand.cpp applygreedypixelfillcommand.h applypixelerasercommand.cpp applypixelerasercommand.h applypixelfillcommand.cpp applypixelfillcommand.h applypixellinecommand.cpp applypixellinecommand.h applypixelpencommand.cpp applypixelpencommand.h applytilecanvaspixelfillcommand.cpp applytilecanvaspixelfillcommand.h applytileerasercommand.cpp applytileerasercommand.h applytilefillcommand.cpp applytilefillcommand.h applytilepencommand.cpp applytilepencommand.h autoswatchmodel.cpp autoswatchmodel.h buildinfo.cpp buildinfo.h canvaspane.cpp canvaspane.h canvaspaneitem.cpp canvaspaneitem.h changeimagecanvassizecommand.cpp changeimagecanvassizecommand.h changeimagesizecommand.cpp changeimagesizecommand.h changelayeredimagecanvassizecommand.cpp changelayeredimagecanvassizecommand.h changelayeredimagesizecommand.cpp changelayeredimagesizecommand.h changelayernamecommand.cpp changelayernamecommand.h changelayeropacitycommand.cpp changelayeropacitycommand.h changelayerordercommand.cpp changelayerordercommand.h changelayervisiblecommand.cpp changelayervisiblecommand.h changetilecanvassizecommand.cpp changetilecanvassizecommand.h commands.h crophelper.cpp crophelper.h deleteguidecommand.cpp deleteguidecommand.h deleteimagecanvasselectioncommand.cpp deleteimagecanvasselectioncommand.h deletelayercommand.cpp deletelayercommand.h duplicatelayercommand.cpp duplicatelayercommand.h filevalidator.cpp filevalidator.h fillalgorithms.cpp fillalgorithms.h flipimagecanvasselectioncommand.cpp flipimagecanvasselectioncommand.h guide.cpp guide.h guidesitem.cpp guidesitem.h imagecanvas.cpp imagecanvas.h imagelayer.cpp imagelayer.h imageproject.cpp imageproject.h jsonutils.cpp jsonutils.h keysequenceeditor.cpp keysequenceeditor.h layeredimagecanvas.cpp layeredimagecanvas.h layeredimageproject.cpp layeredimageproject.h layermodel.cpp layermodel.h mergelayerscommand.cpp mergelayerscommand.h moveguidecommand.cpp moveguidecommand.h modifyimagecanvasselectioncommand.cpp modifyimagecanvasselectioncommand.h movelayeredimagecontentscommand.cpp movelayeredimagecontentscommand.h newprojectvalidator.cpp newprojectvalidator.h panedrawinghelper.cpp panedrawinghelper.h pasteimagecanvascommand.cpp pasteimagecanvascommand.h project.cpp project.h projectimageprovider.cpp projectimageprovider.h projectmanager.cpp projectmanager.h rectangularcursor.cpp rectangularcursor.h ruler.cpp ruler.h saturationlightnesspicker.cpp saturationlightnesspicker.h selectioncursorguide.cpp selectioncursorguide.h selectionitem.cpp selectionitem.h slate-global.h splitter.cpp splitter.h spriteimage.cpp spriteimage.h spriteimageprovider.cpp spriteimageprovider.h swatch.cpp swatch.h swatchcolour.cpp swatchcolour.h swatchmodel.cpp swatchmodel.h texturedfillparameters.cpp texturedfillparameters.h texturedfillpreviewitem.cpp texturedfillpreviewitem.h tile.cpp tile.h tilecanvas.cpp tilecanvas.h tilecanvaspaneitem.cpp tilecanvaspaneitem.h tilegrid.cpp tilegrid.h tileset.cpp tileset.h tilesetproject.cpp tilesetproject.h tilesetswatchimage.cpp tilesetswatchimage.h utils.cpp utils.h ) target_link_libraries( slate PUBLIC projectWarning Qt5::Core Qt5::Quick Qt5::Widgets PRIVATE Qt5::Gui ) target_include_directories( slate PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ) set_target_properties( slate PROPERTIES CXX_EXTENSIONS FALSE CXX_STANDARD 11 CXX_STANDARD_REQUIRED TRUE ) target_compile_definitions( slate PRIVATE SLATE_LIBRARY ) # Generate vcs-repo-state.h if(EXISTS ${CMAKE_SOURCE_DIR}/.git) find_package(Git) if(GIT_FOUND) EXECUTE_PROCESS( COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/vcs-repo-state.h.in ${CMAKE_CURRENT_BINARY_DIR}/vcs-repo-state.h ) else() message(FATAL_ERROR "Can not find Git") endif() else() message(FATAL_ERROR "Can not find .git repo") endif()