Skip to content

Commit

Permalink
Refactor toucan-view code into a library
Browse files Browse the repository at this point in the history
Signed-off-by: Darby Johnston <[email protected]>
  • Loading branch information
darbyjohnston committed Nov 9, 2024
1 parent 69f70db commit 6d3c432
Show file tree
Hide file tree
Showing 60 changed files with 69 additions and 66 deletions.
65 changes: 2 additions & 63 deletions bin/toucan-view/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,66 +1,5 @@
set(HEADERS
App.h
BottomBar.h
ClipItem.h
DocumentTab.h
Document.h
DocumentsModel.h
Export.h
ExportTool.h
GapItem.h
GraphTool.h
IItem.h
IToolWidget.h
InspectorTool.h
MenuBar.h
PlaybackModel.h
SelectionModel.h
StackItem.h
ThumbnailGenerator.h
TimeUnitsModel.h
TimeWidgets.h
TimelineItem.h
TimelineWidget.h
ToolBar.h
TrackItem.h
ViewModel.h
Viewport.h
Window.h
WindowModel.h)

set(SOURCE
App.cpp
BottomBar.cpp
ClipItem.cpp
DocumentTab.cpp
Document.cpp
DocumentsModel.cpp
Export.cpp
ExportTool.cpp
GapItem.cpp
GraphTool.cpp
IItem.cpp
IToolWidget.cpp
InspectorTool.cpp
MenuBar.cpp
PlaybackModel.cpp
SelectionModel.cpp
StackItem.cpp
ThumbnailGenerator.cpp
TimeUnitsModel.cpp
TimeWidgets.cpp
TimelineItem.cpp
TimelineWidget.cpp
ToolBar.cpp
TrackItem.cpp
ViewModel.cpp
Viewport.cpp
Window.cpp
WindowModel.cpp
main.cpp)

add_executable(toucan-view ${HEADERS} ${SOURCE})
target_link_libraries(toucan-view toucan dtk::dtkUI)
add_executable(toucan-view main.cpp)
target_link_libraries(toucan-view toucanView)
set_target_properties(toucan-view PROPERTIES FOLDER bin)
add_dependencies(toucan-view ${TOUCAN_PLUGINS})

Expand Down
2 changes: 1 addition & 1 deletion bin/toucan-view/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Contributors to the toucan project.

#include "App.h"
#include "toucanView/App.h"

DTK_MAIN()
{
Expand Down
4 changes: 2 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_subdirectory(toucan)
if(toucan_EDIT)
add_subdirectory(toucanEdit)
if(toucan_VIEW)
add_subdirectory(toucanView)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
64 changes: 64 additions & 0 deletions lib/toucanView/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
set(HEADERS
App.h
BottomBar.h
ClipItem.h
DocumentTab.h
Document.h
DocumentsModel.h
Export.h
ExportTool.h
GapItem.h
GraphTool.h
IItem.h
IToolWidget.h
InspectorTool.h
MenuBar.h
PlaybackModel.h
SelectionModel.h
StackItem.h
ThumbnailGenerator.h
TimeUnitsModel.h
TimeWidgets.h
TimelineItem.h
TimelineWidget.h
ToolBar.h
TrackItem.h
ViewModel.h
Viewport.h
Window.h
WindowModel.h)

set(SOURCE
App.cpp
BottomBar.cpp
ClipItem.cpp
DocumentTab.cpp
Document.cpp
DocumentsModel.cpp
Export.cpp
ExportTool.cpp
GapItem.cpp
GraphTool.cpp
IItem.cpp
IToolWidget.cpp
InspectorTool.cpp
MenuBar.cpp
PlaybackModel.cpp
SelectionModel.cpp
StackItem.cpp
ThumbnailGenerator.cpp
TimeUnitsModel.cpp
TimeWidgets.cpp
TimelineItem.cpp
TimelineWidget.cpp
ToolBar.cpp
TrackItem.cpp
ViewModel.cpp
Viewport.cpp
Window.cpp
WindowModel.cpp)

add_library(toucanView ${HEADERS} ${SOURCE})
target_link_libraries(toucanView PUBLIC toucan dtk::dtkUI)
set_target_properties(toucanView PROPERTIES FOLDER lib)
add_dependencies(toucanView ${TOUCAN_PLUGINS})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6d3c432

Please sign in to comment.