Guest User

Untitled

a guest
Jul 8th, 2011
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 3.01 KB | None | 0 0
  1. #############################################################################
  2. # VLC-Qt - Qt and libvlc connector library
  3. # Copyright (C) 2011 Tadej Novak <[email protected]>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. #############################################################################
  18. # Configuration #
  19. #################
  20.  
  21. CONFIGURE_FILE(
  22.     "${CMAKE_SOURCE_DIR}/src/Config.h.in"
  23.     "${CMAKE_BINARY_DIR}/src/Config.h"
  24.     @ONLY
  25. )
  26.  
  27. INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/src" "${CMAKE_SOURCE_DIR}/src")
  28.  
  29.  
  30. ###################
  31. # List of sources #
  32. ###################
  33. # Define the C++ source files
  34. SET(VLCQT_SRCS
  35.     core/Audio.cpp
  36.     core/Common.cpp
  37.     core/Enums.cpp
  38.     core/Error.cpp
  39.     core/Instance.cpp
  40.     core/Media.cpp
  41.     core/MediaPlayer.cpp
  42.     core/MetaManager.cpp
  43.     core/Video.cpp
  44.     gui/AudioControl.cpp
  45.     gui/SeekWidget.cpp
  46.     gui/VolumeSlider.cpp
  47.     gui/VideoControl.cpp
  48.     gui/VideoWidget.cpp
  49. )
  50.  
  51. # Define the MOC source files
  52. SET(VLCQT_MOCS
  53.     core/Instance.h
  54.     core/Media.h
  55.     core/MediaPlayer.h
  56.     gui/AudioControl.h
  57.     gui/SeekWidget.h
  58.     gui/VolumeSlider.h
  59.     gui/VideoControl.h
  60.     gui/VideoWidget.h
  61. )
  62.  
  63. # Define the Include files
  64. SET(VLCQT_HEADERS
  65.     ${VLCQT_MOCS}
  66.     core/Audio.h
  67.     core/Common.h
  68.     core/Enums.h
  69.     core/Error.h
  70.     core/MetaManager.h
  71.     core/Video.h
  72.     ${CMAKE_BINARY_DIR}/src/Config.h
  73. )
  74. #####################
  75. # Compiler settings #
  76. #####################
  77. # Include required directories
  78. INCLUDE(${QT_USE_FILE})
  79. QT4_WRAP_CPP(VLCQT_MOCS_SRCS ${VLCQT_MOCS})
  80.  
  81. INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/core" "${CMAKE_SOURCE_DIR}/src/gui" ${LIBVLC_INCLUDE_DIR})
  82.  
  83. # Create the library.
  84. ADD_LIBRARY(${VLCQT_SHARED} SHARED ${VLCQT_SRCS} ${VLCQT_MOCS_SRCS})
  85.  
  86. IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  87.     SET_TARGET_PROPERTIES(${VLCQT_SHARED} PROPERTIES VERSION ${VLCQT_VERSION}
  88.                                           SOVERSION "${VLCQT_VERSION_MAJOR}.${VLCQT_VERSION_MINOR}")
  89. ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  90.  
  91. TARGET_LINK_LIBRARIES(${VLCQT_SHARED} ${QT_LIBRARIES} ${LIBVLC_LIBRARY} ${LIBVLCCORE_LIBRARY})
  92.  
  93.  
  94. ################
  95. # Installation #
  96. ################
  97. INSTALL(TARGETS ${VLCQT_SHARED} RUNTIME DESTINATION bin
  98.                     LIBRARY DESTINATION lib${LIB_SUFFIX}
  99.                     ARCHIVE DESTINATION lib${LIB_SUFFIX})
  100. INSTALL(FILES ${VLCQT_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/vlc-qt)
Advertisement
Add Comment
Please, Sign In to add comment