stuff-from-scratch/apps/sample-gui/CMakeLists.txt
2022-11-30 15:28:15 +00:00

64 lines
2 KiB
CMake

set(APP_NAME sample_gui)
message(STATUS "Checking dependencies for app: " ${APP_NAME})
list(APPEND client_HEADERS
MediaTool.h
text_editor/TextEditorView.h
text_editor/TextEditorModel.h
text_editor/TextEditorController.h
text_editor/PlainTextDocument.h
audio_editor/AudioEditorView.h
image_editor/ImageEditorView.h
image_editor/ImageViewWidget.h
canvas/CanvasView.h
canvas/CanvasController.h
mesh_viewer/MeshViewerView.h
mesh_viewer/MeshViewerController.h
mesh_viewer/MeshViewerCanvas.h
web_client/WebClientView.h)
list(APPEND client_LIB_INCLUDES
text_editor/TextEditorView.cpp
text_editor/TextEditorModel.cpp
text_editor/TextEditorController.cpp
text_editor/PlainTextDocument.cpp
audio_editor/AudioEditorView.cpp
image_editor/ImageEditorView.cpp
image_editor/ImageViewWidget.cpp
mesh_viewer/MeshViewerView.cpp
mesh_viewer/MeshViewerController.cpp
mesh_viewer/MeshViewerCanvas.cpp
canvas/CanvasView.cpp
canvas/CanvasController.cpp
web_client/WebClientView.cpp
MediaTool.cpp)
set(DEPENDENCIES_FOUND True)
if(WIN32)
add_executable(${APP_NAME} WIN32 gui-main-win.cpp ${client_LIB_INCLUDES})
else()
find_package(X11 QUIET)
if(X11_FOUND)
add_executable(${APP_NAME} gui-main.cpp ${client_LIB_INCLUDES} ${client_HEADERS})
else()
message(STATUS "X11 not found - skipping")
set(DEPENDENCIES_FOUND FALSE)
endif()
endif()
if(DEPENDENCIES_FOUND)
target_include_directories(${APP_NAME} PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/text_editor"
"${CMAKE_CURRENT_SOURCE_DIR}/audio_editor"
"${CMAKE_CURRENT_SOURCE_DIR}/image_editor"
"${CMAKE_CURRENT_SOURCE_DIR}/web_client"
"${CMAKE_CURRENT_SOURCE_DIR}/canvas"
"${CMAKE_CURRENT_SOURCE_DIR}/mesh_viewer"
)
target_link_libraries(${APP_NAME} PUBLIC client windows console core network database geometry audio web)
set_property(TARGET ${APP_NAME} PROPERTY FOLDER apps)
endif()