Commit 6ef4eb5e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: Correctly build qt4.

parent 7185386d
set(qt4_SOURCES qt4.cpp menus.cpp main_interface.cpp dialogs_provider.cpp input_manager.cpp dialogs/playlist.cpp dialogs/bookmarks.cpp dialogs/preferences.cpp dialogs/mediainfo.cpp dialogs/extended.cpp dialogs/messages.cpp dialogs/errors.cpp dialogs/interaction.cpp dialogs/sout.cpp dialogs/help.cpp dialogs/gototime.cpp dialogs/open.cpp dialogs/vlm.cpp dialogs/podcast_configuration.cpp components/extended_panels.cpp components/info_panels.cpp components/preferences_widgets.cpp components/complete_preferences.cpp components/simple_preferences.cpp components/open_panels.cpp components/interface_widgets.cpp components/playlist/playlist_model.cpp components/playlist/playlist_item.cpp components/playlist/standardpanel.cpp components/playlist/playlist.cpp components/playlist/selector.cpp util/input_slider.cpp util/customwidgets.cpp util/registry.cpp )
set(qt4_UIS ui/equalizer.ui ui/v4l2.ui ui/video_effects.ui ui/open_file.ui ui/open_disk.ui ui/open_net.ui ui/open_capture.ui ui/open.ui ui/podcast_configuration.ui ui/sprefs_audio.ui ui/sprefs_input.ui ui/sprefs_interface.ui ui/sprefs_subtitles.ui ui/sprefs_video.ui ui/streampanel.ui ui/sout.ui ui/vlm.ui )
if(QT4_FOUND)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
qt4_automoc(${qt4_SOURCES})
vlc_qt4_wrap_ui(qt4_UIS_H ${qt4_UIS})
endif(QT4_FOUND)
vlc_add_module(qt4 ${qt4_SOURCES} ${qt4_UIS_H})
...@@ -398,7 +398,23 @@ if(QT4_FOUND) ...@@ -398,7 +398,23 @@ if(QT4_FOUND)
vlc_check_include_files (qt.h) vlc_check_include_files (qt.h)
vlc_enable_modules(qt4) vlc_enable_modules(qt4)
vlc_add_module_compile_flag(qt4 ${QT_CFLAGS} ) vlc_add_module_compile_flag(qt4 ${QT_CFLAGS} )
vlc_module_add_link_libraries(qt4 ${QT_LIBRARIES} Qt4) vlc_module_add_link_libraries(qt4 ${QT_LIBRARIES})
# Define our own qt4_wrap_ui macro to match wanted behaviour
MACRO (VLC_QT4_WRAP_UI outfiles )
FOREACH (it ${ARGN})
string(REPLACE ".ui" ".h" outfile "${it}")
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile})
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND mkdir -p `dirname ${outfile}`
COMMAND ${QT_UIC_EXECUTABLE}
ARGS -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile})
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it)
ENDMACRO (VLC_QT4_WRAP_UI)
endif(QT4_FOUND) endif(QT4_FOUND)
find_package(OpenGL) find_package(OpenGL)
......
...@@ -19,6 +19,9 @@ ln -sf ../$cmake_dir/CMakeLists/src_CMakeLists.txt src/CMakeLists.txt ...@@ -19,6 +19,9 @@ ln -sf ../$cmake_dir/CMakeLists/src_CMakeLists.txt src/CMakeLists.txt
echo "Installing modules/CMakeLists.txt" echo "Installing modules/CMakeLists.txt"
ln -s ../$cmake_dir/CMakeLists/modules_CMakeLists.txt modules/CMakeLists.txt ln -s ../$cmake_dir/CMakeLists/modules_CMakeLists.txt modules/CMakeLists.txt
echo "Installing modules/gui/qt4/CMakeLists.txt"
ln -s ../../../$cmake_dir/CMakeLists/qt4_CMakeLists.txt modules/gui/qt4/CMakeLists.txt
echo "Installing po/CMakeLists.txt" echo "Installing po/CMakeLists.txt"
ln -s ../$cmake_dir/CMakeLists/po_CMakeLists.txt po/CMakeLists.txt ln -s ../$cmake_dir/CMakeLists/po_CMakeLists.txt po/CMakeLists.txt
......
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