Source

fftranscoder / CMakeLists.txt

# Copyright (C) 2012 by Ivan Andrianov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

project(FFTRANSCODER)

cmake_minimum_required(VERSION 2.8.6)

set(CMAKE_MODULE_PATH ${FFTRANSCODER_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})

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)
include_directories(${PYTHON_INCLUDE_DIRS})

execute_process(COMMAND ${PYTHON_EXECUTABLE} --version
                ERROR_VARIABLE PYTHON_VERSION_FULL)
string(REGEX MATCH "[0-9]+\\.[0-9]+" PYTHON_VERSION "${PYTHON_VERSION_FULL}")

find_package(SIP 4.13 REQUIRED)
find_package(PyQt4 4.8 REQUIRED)
include_directories(${SIP_INCLUDE_DIR})

find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL)
find_package(FLAC)

include_directories(${FFTRANSCODER_SOURCE_DIR}/src)

if(WIN32)
  set(FFTRANSCODER_BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
  set(FFTRANSCODER_LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
  set(FFTRANSCODER_DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
  set(FFTRANSCODER_PLUGIN_INSTALL_DIR
      ${FFTRANSCODER_BIN_INSTALL_DIR}/plugins)
  set(FFTRANSCODER_PYTHON_INSTALL_DIR
    ${FFTRANSCODER_LIB_INSTALL_DIR}/fftranscoder)
else(WIN32)
  set(CMAKE_CXX_FLAGS "-fvisibility=hidden")
  set(FFTRANSCODER_BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
  string(COMPARE EQUAL ${CMAKE_SYSTEM_PROCESSOR} x86_64 IS64BIT)
  if(IS64BIT)
    set(FFTRANSCODER_LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib64)
  else(IS64BIT)
    set(FFTRANSCODER_LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
  endif(IS64BIT)
  set(FFTRANSCODER_DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/fftranscoder)
  set(FFTRANSCODER_PLUGIN_INSTALL_DIR
      ${FFTRANSCODER_LIB_INSTALL_DIR}/fftranscoder/plugins)
  set(FFTRANSCODER_PYTHON_INSTALL_DIR
      ${FFTRANSCODER_LIB_INSTALL_DIR}/python${PYTHON_VERSION}/site-packages/fftranscoder)
endif(WIN32)

add_subdirectory(pysrc/fftranscoder)
add_subdirectory(src/codecs)

install(FILES fftranscoder.py DESTINATION ${FFTRANSCODER_BIN_INSTALL_DIR})

if(WIN32)
  install(FILES license.rtf DESTINATION ${FFTRANSCODER_DATA_INSTALL_DIR})
else(WIN32)
  install(FILES license.txt DESTINATION ${FFTRANSCODER_DATA_INSTALL_DIR})
endif(WIN32)

if(UNIX)
  install(FILES fftranscoder.desktop
          DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
endif(UNIX)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.