Commits

Ivan Andrianov  committed c0af3db

Using AUTOMOC property to eliminate specifying MOC files by hand.

  • Participants
  • Parent commits d0bccc9

Comments (0)

Files changed (4)

File CMakeLists.txt

 
 project(FFTRANSCODER)
 
-cmake_minimum_required(VERSION 2.8.0)
+cmake_minimum_required(VERSION 2.8.6)
 
 set(CMAKE_MODULE_PATH ${FFTRANSCODER_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
 
-find_package(Qt4 4.7.0 COMPONENTS QtCore QtGui REQUIRED)
+find_package(Qt4 4.8.0 COMPONENTS QtCore QtGui REQUIRED)
 include(${QT_USE_FILE})
+set(CMAKE_AUTOMOC 1)
 
 find_package(PythonInterp 2.7 REQUIRED)
 find_package(PythonLibs 2.7 REQUIRED)

File src/codecs/CMakeLists.txt

   transcoder.cpp
 )
 
-set(FFTRANSCODER_CODECS_MOC_SRCS
-  transcoder.h
-)
-
-qt4_wrap_cpp(FFTRANSCODER_CODECS_SRCS_CXX ${FFTRANSCODER_CODECS_MOC_SRCS})
-
 add_library(fftranscoder_codecs SHARED ${FFTRANSCODER_CODECS_SRCS_CXX})
 
 target_link_libraries(fftranscoder_codecs ${QT_QTCORE_LIBRARY})

File src/codecs/plugins/ffmpegdecoder/CMakeLists.txt

   ffmpegdecoderplugin.cpp
 )
 
-set(FFMPEG_DECODER_MOC_SRCS
-  ffmpegdecoderplugin.h
-)
-
-qt4_wrap_cpp(FFMPEG_DECODER_SRCS_CXX ${FFMPEG_DECODER_MOC_SRCS})
-
 add_library(ffmpeg_decoder MODULE ${FFMPEG_DECODER_SRCS_CXX})
 
 target_link_libraries(ffmpeg_decoder fftranscoder_codecs ${QT_QTCORE_LIBRARY}

File src/codecs/plugins/flacencoder/CMakeLists.txt

   flacencoderplugin.cpp
 )
 
-set(FLAC_ENCODER_MOC_SRCS
-  flacencoderplugin.h
-)
-
-qt4_wrap_cpp(FLAC_ENCODER_SRCS_CXX ${FLAC_ENCODER_MOC_SRCS})
-
 add_library(flac_encoder MODULE ${FLAC_ENCODER_SRCS_CXX})
 
 target_link_libraries(flac_encoder fftranscoder_codecs ${QT_QTCORE_LIBRARY}