Commit dea2bdbe authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

CMake: Adding a WITH_GUI parameter, so that vlmc can be build without GUI

parent 7fb2f4bc
......@@ -53,6 +53,7 @@ ENDIF(UNIX)
SET(WITH_CRASHBUTTON FALSE CACHE BOOL "Enable the crash button")
SET(WITH_CRASHHANDLER_GUI TRUE CACHE BOOL "Enable the crash handler GUI (with backtrace and restart capabilities)")
SET(WITH_CRASHHANDLER TRUE CACHE BOOL "Enable the crash handler")
SET(WITH_GUI TRUE CACHE BOOL "Enable the VLMC's GUI")
FIND_PACKAGE(LIBVLC)
IF (NOT LIBVLC_FOUND)
......@@ -62,7 +63,11 @@ FIND_PACKAGE(LIBVLC)
INCLUDE_DIRECTORIES(${LIBVLC_INCLUDE_DIR})
# search for Qt4
FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtGui QtSvg QtXml REQUIRED )
IF (WITH_GUI)
FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtXml QtGui QtSvg REQUIRED )
ELSE(WITH_GUI)
FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtXml REQUIRED )
ENDIF(WITH_GUI)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
......
......@@ -19,52 +19,6 @@ SET(VLMC_SRCS
EffectsEngine/PluginsAPI/InSlot.hpp
EffectsEngine/PluginsAPI/LightVideoFrame.cpp
EffectsEngine/PluginsAPI/OutSlot.hpp
Gui/About.cpp
Gui/AudioSpectrumDrawer.cpp
Gui/ClickableLabel.cpp
Gui/ClipProperty.cpp
Gui/DockWidgetManager.cpp
Gui/LanguageHelper.cpp
Gui/preview/LCDTimecode.cpp
Gui/MainWindow.cpp
Gui/preview/PreviewRuler.cpp
Gui/preview/PreviewWidget.cpp
Gui/import/TagWidget.cpp
Gui/UndoStack.cpp
Gui/WorkflowFileRendererDialog.cpp
Gui/export/RendererSettings.cpp
Gui/import/ImportController.cpp
Gui/library/ListViewController.cpp
Gui/library/MediaCellView.cpp
Gui/library/MediaListView.cpp
Gui/library/StackViewController.cpp
Gui/library/StackViewNavController.cpp
Gui/settings/BoolWidget.cpp
Gui/settings/DoubleWidget.cpp
Gui/settings/IntWidget.cpp
Gui/settings/KeyboardShortcut.cpp
Gui/settings/KeyboardShortcutInput.cpp
Gui/settings/LanguageWidget.cpp
Gui/settings/Panel.cpp
Gui/settings/PreferenceWidget.cpp
Gui/settings/Settings.cpp
Gui/settings/StringWidget.cpp
Gui/timeline/AbstractGraphicsMediaItem.cpp
Gui/timeline/GraphicsAudioItem.cpp
Gui/timeline/GraphicsCursorItem.cpp
Gui/timeline/GraphicsMovieItem.cpp
Gui/timeline/GraphicsTrack.cpp
Gui/timeline/Timeline.cpp
Gui/timeline/TracksControls.cpp
Gui/timeline/TracksRuler.cpp
Gui/timeline/TracksScene.cpp
Gui/timeline/TracksView.cpp
Gui/widgets/TrackControls.cpp
Gui/wizard/GeneralPage.cpp
Gui/wizard/OpenPage.cpp
Gui/wizard/ProjectWizard.cpp
Gui/wizard/VideoPage.cpp
Gui/wizard/WelcomePage.cpp
Library/Library.cpp
Library/MediaContainer.cpp
LibVLCpp/VLCInstance.cpp
......@@ -106,46 +60,6 @@ SET (VLMC_HDRS
Commands/KeyboardShortcutHelper.h
Settings/SettingsManager.h
Settings/SettingValue.h
Gui/About.h
Gui/ClickableLabel.h
Gui/ClipProperty.h
Gui/DockWidgetManager.h
Gui/export/RendererSettings.h
Gui/import/ImportController.h
Gui/LanguageHelper.h
Gui/preview/LCDTimecode.h
Gui/library/ListViewController.h
Gui/library/MediaCellView.h
Gui/library/MediaListView.h
Gui/library/StackViewController.h
Gui/library/StackViewNavController.h
Gui/library/ViewController.h
Gui/MainWindow.h
Gui/preview/PreviewRuler.h
Gui/preview/PreviewWidget.h
Gui/settings/KeyboardShortcutInput.h
Gui/settings/Panel.h
Gui/settings/PreferenceWidget.h
Gui/settings/Settings.h
Gui/import/TagWidget.h
Gui/timeline/AbstractGraphicsMediaItem.h
Gui/timeline/GraphicsAudioItem.h
Gui/timeline/GraphicsCursorItem.h
Gui/timeline/GraphicsMovieItem.h
Gui/timeline/GraphicsTrack.h
Gui/timeline/Timeline.h
Gui/timeline/TracksControls.h
Gui/timeline/TracksRuler.h
Gui/timeline/TracksScene.h
Gui/timeline/TracksView.h
Gui/UndoStack.h
Gui/widgets/TrackControls.h
Gui/wizard/GeneralPage.h
Gui/wizard/OpenPage.h
Gui/wizard/ProjectWizard.h
Gui/wizard/VideoPage.h
Gui/wizard/WelcomePage.h
Gui/WorkflowFileRendererDialog.h
Library/Library.h
Library/MediaContainer.h
LibVLCpp/VLCInstance.h
......@@ -169,27 +83,6 @@ SET (VLMC_HDRS
Workflow/VideoClipWorkflow.h
)
SET(VLMC_UIS
Gui/export/RendererSettings.ui
Gui/import/ui/ImportController.ui
Gui/library/StackViewNavController.ui
Gui/library/ui/MediaCellView.ui
Gui/library/ui/StackViewNavController.ui
Gui/ui/About.ui
Gui/ui/ClipProperty.ui
Gui/ui/MainWindow.ui
Gui/preview/ui/PreviewWidget.ui
Gui/import/ui/TagWidget.ui
Gui/ui/Timeline.ui
Gui/ui/transcode.ui
Gui/ui/WorkflowFileRendererDialog.ui
Gui/widgets/TrackControls.ui
Gui/wizard/ui/GeneralPage.ui
Gui/wizard/ui/OpenPage.ui
Gui/wizard/ui/VideoPage.ui
Gui/wizard/ui/WelcomePage.ui
)
SET(VLMC_RCC
../ressources.qrc
../ts/ressources-ts.qrc
......@@ -199,18 +92,6 @@ IF (WIN32)
LIST( APPEND VLMC_RCC ../resources/styles.qrc )
ENDIF (WIN32)
IF (WITH_CRASHHANDLER_GUI)
LIST( APPEND VLMC_SRCS Gui/widgets/CrashHandler.cpp )
IF ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
LIST( APPEND VLMC_SRCS Tools/UnixBacktraceGenerator.cpp )
ELSE ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
LIST( APPEND VLMC_SRCS Tools/Win32BacktraceGenerator.cpp )
ENDIF( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
LIST( APPEND VLMC_HDRS Gui/widgets/CrashHandler.h )
LIST( APPEND VLMC_UIS Gui/widgets/CrashHandler.ui )
ENDIF(WITH_CRASHHANDLER_GUI)
#include paths for vlmc
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
......@@ -238,27 +119,168 @@ INCLUDE_DIRECTORIES(
Workflow
)
QT4_WRAP_UI(VLMC_UIS_H ${VLMC_UIS})
QT4_ADD_RESOURCES(VLMC_RCC_SRCS ${VLMC_RCC})
QT4_WRAP_CPP(VLMC_MOC_SRCS ${VLMC_HDRS})
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
IF(WIN32)
SET( GUI_TYPE WIN32 )
ENDIF( WIN32 )
ADD_EXECUTABLE(vlmc ${GUI_TYPE} ${VLMC_SRCS} ${VLMC_MOC_SRCS} ${VLMC_UIS_H} ${VLMC_RCC_SRCS})
ADD_DEPENDENCIES(vlmc translations)
#Add GUI stuff if required
IF (NOT WITH_GUI)
ADD_EXECUTABLE(vlmc ${GUI_TYPE} ${VLMC_SRCS} ${VLMC_MOC_SRCS} ${VLMC_RCC_SRCS})
TARGET_LINK_LIBRARIES(vlmc
${QT_QTCORE_LIBRARY}
${QT_QTXML_LIBRARY}
${LIBVLC_LIBRARY}
${LIBVLCCORE_LIBRARY}
)
QT4_ADD_RESOURCES(VLMC_RCC_SRCS ${VLMC_RCC})
QT4_WRAP_CPP(VLMC_MOC_SRCS ${VLMC_HDRS})
TARGET_LINK_LIBRARIES(vlmc
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${LIBVLC_LIBRARY}
${LIBVLCCORE_LIBRARY}
)
ELSE(NOT WITH_GUI)
LIST( APPEND VLMC_SRCS
Gui/About.cpp
Gui/AudioSpectrumDrawer.cpp
Gui/ClickableLabel.cpp
Gui/ClipProperty.cpp
Gui/DockWidgetManager.cpp
Gui/LanguageHelper.cpp
Gui/preview/LCDTimecode.cpp
Gui/MainWindow.cpp
Gui/preview/PreviewRuler.cpp
Gui/preview/PreviewWidget.cpp
Gui/import/TagWidget.cpp
Gui/UndoStack.cpp
Gui/WorkflowFileRendererDialog.cpp
Gui/export/RendererSettings.cpp
Gui/import/ImportController.cpp
Gui/library/ListViewController.cpp
Gui/library/MediaCellView.cpp
Gui/library/MediaListView.cpp
Gui/library/StackViewController.cpp
Gui/library/StackViewNavController.cpp
Gui/settings/BoolWidget.cpp
Gui/settings/DoubleWidget.cpp
Gui/settings/IntWidget.cpp
Gui/settings/KeyboardShortcut.cpp
Gui/settings/KeyboardShortcutInput.cpp
Gui/settings/LanguageWidget.cpp
Gui/settings/Panel.cpp
Gui/settings/PreferenceWidget.cpp
Gui/settings/Settings.cpp
Gui/settings/StringWidget.cpp
Gui/timeline/AbstractGraphicsMediaItem.cpp
Gui/timeline/GraphicsAudioItem.cpp
Gui/timeline/GraphicsCursorItem.cpp
Gui/timeline/GraphicsMovieItem.cpp
Gui/timeline/GraphicsTrack.cpp
Gui/timeline/Timeline.cpp
Gui/timeline/TracksControls.cpp
Gui/timeline/TracksRuler.cpp
Gui/timeline/TracksScene.cpp
Gui/timeline/TracksView.cpp
Gui/widgets/TrackControls.cpp
Gui/wizard/GeneralPage.cpp
Gui/wizard/OpenPage.cpp
Gui/wizard/ProjectWizard.cpp
Gui/wizard/VideoPage.cpp
Gui/wizard/WelcomePage.cpp
)
LIST( APPEND VLMC_HDRS
Gui/About.h
Gui/ClickableLabel.h
Gui/ClipProperty.h
Gui/DockWidgetManager.h
Gui/export/RendererSettings.h
Gui/import/ImportController.h
Gui/LanguageHelper.h
Gui/preview/LCDTimecode.h
Gui/library/ListViewController.h
Gui/library/MediaCellView.h
Gui/library/MediaListView.h
Gui/library/StackViewController.h
Gui/library/StackViewNavController.h
Gui/library/ViewController.h
Gui/MainWindow.h
Gui/preview/PreviewRuler.h
Gui/preview/PreviewWidget.h
Gui/settings/KeyboardShortcutInput.h
Gui/settings/Panel.h
Gui/settings/PreferenceWidget.h
Gui/settings/Settings.h
Gui/import/TagWidget.h
Gui/timeline/AbstractGraphicsMediaItem.h
Gui/timeline/GraphicsAudioItem.h
Gui/timeline/GraphicsCursorItem.h
Gui/timeline/GraphicsMovieItem.h
Gui/timeline/GraphicsTrack.h
Gui/timeline/Timeline.h
Gui/timeline/TracksControls.h
Gui/timeline/TracksRuler.h
Gui/timeline/TracksScene.h
Gui/timeline/TracksView.h
Gui/UndoStack.h
Gui/widgets/TrackControls.h
Gui/wizard/GeneralPage.h
Gui/wizard/OpenPage.h
Gui/wizard/ProjectWizard.h
Gui/wizard/VideoPage.h
Gui/wizard/WelcomePage.h
Gui/WorkflowFileRendererDialog.h
)
SET(VLMC_UIS
Gui/export/RendererSettings.ui
Gui/import/ui/ImportController.ui
Gui/library/StackViewNavController.ui
Gui/library/ui/MediaCellView.ui
Gui/library/ui/StackViewNavController.ui
Gui/ui/About.ui
Gui/ui/ClipProperty.ui
Gui/ui/MainWindow.ui
Gui/preview/ui/PreviewWidget.ui
Gui/import/ui/TagWidget.ui
Gui/ui/Timeline.ui
Gui/ui/transcode.ui
Gui/ui/WorkflowFileRendererDialog.ui
Gui/widgets/TrackControls.ui
Gui/wizard/ui/GeneralPage.ui
Gui/wizard/ui/OpenPage.ui
Gui/wizard/ui/VideoPage.ui
Gui/wizard/ui/WelcomePage.ui
)
IF (WITH_CRASHHANDLER_GUI)
LIST( APPEND VLMC_SRCS Gui/widgets/CrashHandler.cpp )
IF ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
LIST( APPEND VLMC_SRCS Tools/UnixBacktraceGenerator.cpp )
ELSE ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
LIST( APPEND VLMC_SRCS Tools/Win32BacktraceGenerator.cpp )
ENDIF( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
LIST( APPEND VLMC_HDRS Gui/widgets/CrashHandler.h )
LIST( APPEND VLMC_UIS Gui/widgets/CrashHandler.ui )
ENDIF(WITH_CRASHHANDLER_GUI)
QT4_WRAP_UI(VLMC_UIS_H ${VLMC_UIS})
QT4_ADD_RESOURCES(VLMC_RCC_SRCS ${VLMC_RCC})
QT4_WRAP_CPP(VLMC_MOC_SRCS ${VLMC_HDRS})
IF(WIN32)
SET( GUI_TYPE WIN32 )
ENDIF( WIN32 )
ADD_EXECUTABLE(vlmc ${GUI_TYPE} ${VLMC_SRCS} ${VLMC_MOC_SRCS} ${VLMC_UIS_H} ${VLMC_RCC_SRCS})
TARGET_LINK_LIBRARIES(vlmc
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${LIBVLC_LIBRARY}
${LIBVLCCORE_LIBRARY}
)
ENDIF(NOT WITH_GUI)
ADD_DEPENDENCIES(vlmc translations)
INSTALL(TARGETS vlmc RUNTIME DESTINATION ${VLMC_BIN_DIR})
......@@ -272,7 +294,6 @@ IF(UNIX)
IF (WITH_PROFILING)
ADD_DEFINITIONS( -pg )
SET_TARGET_PROPERTIES( vlmc PROPERTIES LINK_FLAGS -pg )
#TARGET_LINK_LIBRARIES( vlmc -pg )
ENDIF(WITH_PROFILING)
ENDIF(UNIX)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment