diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2009-11-11 04:02:06 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2009-11-12 05:39:38 (GMT) |
commit | 70490a3f5078f215c905b84fbb11a108dc973a07 (patch) | |
tree | dd4de96d501a63cde5f7a5be5b796bfdd5464a5d /src/3rdparty | |
parent | 80c24f730c3443e8c05fca374fca365456034fe8 (diff) | |
download | Qt-70490a3f5078f215c905b84fbb11a108dc973a07.zip Qt-70490a3f5078f215c905b84fbb11a108dc973a07.tar.gz Qt-70490a3f5078f215c905b84fbb11a108dc973a07.tar.bz2 |
Phonon; Integrate changes to cmake files.
Reviewed-by: TrustMe
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/phonon/CMakeLists.txt | 25 | ||||
-rw-r--r-- | src/3rdparty/phonon/ds9/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/3rdparty/phonon/gstreamer/CMakeLists.txt | 24 | ||||
-rw-r--r-- | src/3rdparty/phonon/includes/CMakeLists.txt | 4 |
4 files changed, 38 insertions, 20 deletions
diff --git a/src/3rdparty/phonon/CMakeLists.txt b/src/3rdparty/phonon/CMakeLists.txt index c18c3e7..a25ec5d 100644 --- a/src/3rdparty/phonon/CMakeLists.txt +++ b/src/3rdparty/phonon/CMakeLists.txt @@ -55,7 +55,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_SYSTEM_NAME MATCHES Linux) set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common") set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common") - add_definitions (-D_BSD_SOURCE) + add_definitions (-D_BSD_SOURCE -DQT_NO_EXCEPTIONS) endif (CMAKE_SYSTEM_NAME MATCHES Linux) # gcc under Windows @@ -115,7 +115,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)" _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}") endif (GCC_IS_NEWER_THAN_4_1) - if (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR) + if (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") set (KDE4_C_FLAGS "-fvisibility=hidden") # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default"))) @@ -137,9 +137,9 @@ if (CMAKE_COMPILER_IS_GNUCXX) if (GCC_IS_NEWER_THAN_4_2) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") endif (GCC_IS_NEWER_THAN_4_2) - else (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR) + else (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) set (__KDE_HAVE_GCC_VISIBILITY 0) - endif (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR) + endif (__KDE_HAVE_GCC_VISIBILITY AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32) endif (CMAKE_COMPILER_IS_GNUCXX) @@ -149,8 +149,8 @@ set(CMAKE_COLOR_MAKEFILE ON) set(PHONON_LIB_MAJOR_VERSION "4") set(PHONON_LIB_MINOR_VERSION "3") -set(PHONON_LIB_PATCH_VERSION "1") -set(PHONON_LIB_VERSION "${PHONON_LIB_MAJOR_VERSION}.3.1") +set(PHONON_LIB_PATCH_VERSION "50") +set(PHONON_LIB_VERSION "${PHONON_LIB_MAJOR_VERSION}.4.0") set(PHONON_LIB_SOVERSION ${PHONON_LIB_MAJOR_VERSION}) add_definitions(${QT_DEFINITIONS}) @@ -177,11 +177,15 @@ endmacro(_SET_FANCY) set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) -_set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") -_set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") +if (WIN32) + _set_fancy(EXEC_INSTALL_PREFIX "." "Base directory for executables and libraries") +else(WIN32) + _set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") +endif(WIN32) +_set_fancy(SHARE_INSTALL_PREFIX "${EXEC_INSTALL_PREFIX}/share" "Base directory for files which go to share/") +_set_fancy(INCLUDE_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/include" "The subdirectory to the header prefix") _set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") _set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})") -_set_fancy(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" "The subdirectory to the header prefix") _set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)") _set_fancy(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") _set_fancy(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/services" "The install dir for service (desktop, protocol, ...) files") @@ -196,6 +200,8 @@ set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" if(APPLE) set(INSTALL_TARGETS_DEFAULT_ARGS ${INSTALL_TARGETS_DEFAULT_ARGS} BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) + set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined dynamic_lookup") + set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS} -flat_namespace -undefined dynamic_lookup") endif(APPLE) if (CMAKE_SYSTEM_NAME MATCHES Linux) @@ -249,7 +255,6 @@ if(APPLE) endif(APPLE) -add_subdirectory(cmake) add_subdirectory(phonon) add_subdirectory(includes) if (Q_WS_MAC AND BUILD_PHONON_QT7) diff --git a/src/3rdparty/phonon/ds9/CMakeLists.txt b/src/3rdparty/phonon/ds9/CMakeLists.txt index 1bb6f6f..7378b53 100644 --- a/src/3rdparty/phonon/ds9/CMakeLists.txt +++ b/src/3rdparty/phonon/ds9/CMakeLists.txt @@ -40,14 +40,15 @@ if (BUILD_PHONON_DS9) ) add_definitions(-DPHONON_MAKE_QT_ONLY_BACKEND -DUNICODE) - automoc4_add_library(phonon_ds9 SHARED ${phonon_ds9_SRCS}) + automoc4_add_library(phonon_ds9 MODULE ${phonon_ds9_SRCS}) set_target_properties(phonon_ds9 PROPERTIES PREFIX "") target_link_libraries(phonon_ds9 ${PHONON_LIBS} ${QT_QTOPENGL_LIBRARY} ${OPENGL_gl_LIBRARY} dxguid strmiids dmoguids msdmo ole32 oleaut32 uuid gdi32) + # 'MODULE' is treated as a LIBRARY install(TARGETS phonon_ds9 RUNTIME DESTINATION ${BIN_INSTALL_DIR}/phonon_backend - LIBRARY DESTINATION ${LIB_INSTALL_DIR} + LIBRARY DESTINATION ${BIN_INSTALL_DIR}/phonon_backend ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) install(FILES ds9.desktop DESTINATION ${SERVICES_INSTALL_DIR}/phononbackends) endif (BUILD_PHONON_DS9) diff --git a/src/3rdparty/phonon/gstreamer/CMakeLists.txt b/src/3rdparty/phonon/gstreamer/CMakeLists.txt index 4946f5f..08f892a 100644 --- a/src/3rdparty/phonon/gstreamer/CMakeLists.txt +++ b/src/3rdparty/phonon/gstreamer/CMakeLists.txt @@ -17,8 +17,20 @@ project(phonon-gstreamer) include(ConfigureChecks.cmake) if (BUILD_PHONON_GSTREAMER) - include_directories(${GSTREAMER_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} - ${LIBXML2_INCLUDE_DIR}) + include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${GSTREAMER_INCLUDE_DIR} + ${GLIB2_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${X11_X11_INCLUDE_PATH}) + add_definitions(-DPHONON_BACKEND_VERSION_4_2) + + # configure plugin api + if(USE_INSTALL_PLUGIN) + set(PLUGIN_INSTALL_API TRUE) + endif(USE_INSTALL_PLUGIN) + + configure_file(phonon-config-gstreamer.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/phonon-config-gstreamer.h ) set(phonon_gstreamer_SRCS audiooutput.cpp @@ -45,17 +57,17 @@ if (BUILD_PHONON_GSTREAMER) ) find_package(Alsa) - if(ALSA_FOUND) + macro_ensure_version("0.10.22" ${GSTREAMER_VERSION} GSTREAMER_HAS_NONBLOCKING_ALSASINK) + if(ALSA_FOUND AND NOT GSTREAMER_HAS_NONBLOCKING_ALSASINK) add_definitions(-DUSE_ALSASINK2) include_directories(${ALSA_INCLUDES}) set(phonon_gstreamer_SRCS ${phonon_gstreamer_SRCS} alsasink2.c ) - endif(ALSA_FOUND) + endif(ALSA_FOUND AND NOT GSTREAMER_HAS_NONBLOCKING_ALSASINK) - automoc4(phonon_gstreamer phonon_gstreamer_SRCS) - add_library(phonon_gstreamer SHARED ${phonon_gstreamer_SRCS}) + automoc4_add_library(phonon_gstreamer MODULE ${phonon_gstreamer_SRCS}) set_target_properties(phonon_gstreamer PROPERTIES PREFIX "") target_link_libraries(phonon_gstreamer ${QT_QTOPENGL_LIBRARY} diff --git a/src/3rdparty/phonon/includes/CMakeLists.txt b/src/3rdparty/phonon/includes/CMakeLists.txt index 349acd8..dff86c3 100644 --- a/src/3rdparty/phonon/includes/CMakeLists.txt +++ b/src/3rdparty/phonon/includes/CMakeLists.txt @@ -35,7 +35,7 @@ install( FILES Phonon/VolumeFaderEffect Phonon/VolumeFaderInterface Phonon/VolumeSlider -DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Phonon) +DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Phonon COMPONENT Devel) install(FILES Phonon/Experimental/AbstractVideoDataOutput @@ -46,4 +46,4 @@ install(FILES Phonon/Experimental/VideoFrame Phonon/Experimental/VideoFrame2 Phonon/Experimental/Visualization -DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Phonon/Experimental) +DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Phonon/Experimental COMPONENT Devel) |