diff --git a/lib/addons/library.kodi.adsp/CMakeLists.txt b/lib/addons/library.kodi.adsp/CMakeLists.txt new file mode 100644 index 0000000000000..b8789d58e87da --- /dev/null +++ b/lib/addons/library.kodi.adsp/CMakeLists.txt @@ -0,0 +1,10 @@ +set(SOURCES libKODI_adsp.cpp) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} + ${CORE_SOURCE_DIR}/xbmc/addons/include + ${CORE_SOURCE_DIR}/xbmc) + #${CORE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers) + +set(CMAKE_POSITION_INDEPENDENT_CODE 1) + +core_add_library(KODI_adsp 1) diff --git a/project/cmake/CMakeLists.txt b/project/cmake/CMakeLists.txt index 652fd882b4c93..cfc0e49547b06 100644 --- a/project/cmake/CMakeLists.txt +++ b/project/cmake/CMakeLists.txt @@ -26,6 +26,7 @@ option(ENABLE_AIRTUNES "Enable AirTunes support?" ON) option(ENABLE_CEC "Enable CEC support?" ON) if(UNIX) option(ENABLE_INTERNAL_FFMPEG "Enable internal ffmpeg?" ON) + option(FFMPEG_PATH "Path to external ffmpeg?" "") option(ENABLE_INTERNAL_CROSSGUID "Enable internal crossguid?" ON) option(ENABLE_ALSA "Enable ALSA support?" ON) option(ENABLE_PULSEAUDIO "Enable PulseAudio support?" ON) diff --git a/project/cmake/modules/FindCpluff.cmake b/project/cmake/modules/FindCpluff.cmake index fb1da2db578bc..29f31390ac7ad 100644 --- a/project/cmake/modules/FindCpluff.cmake +++ b/project/cmake/modules/FindCpluff.cmake @@ -3,7 +3,7 @@ get_filename_component(expat_dir ${EXPAT_LIBRARY} PATH) set(ldflags "-L${expat_dir}") ExternalProject_ADD(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff PREFIX ${CORE_BUILD_DIR}/cpluff - UPDATE_COMMAND ${UPDATE_COMMAND} + UPDATE_COMMAND autoreconf -vif CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} ${CORE_SOURCE_DIR}/lib/cpluff/configure --disable-nls --enable-static diff --git a/project/cmake/modules/FindFFMPEG.cmake b/project/cmake/modules/FindFFMPEG.cmake index 7f5d3cd3da761..8cad9c1847da9 100644 --- a/project/cmake/modules/FindFFMPEG.cmake +++ b/project/cmake/modules/FindFFMPEG.cmake @@ -1,12 +1,17 @@ +include(ExternalProject) +file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FFMPEG-VERSION VER) +string(REGEX MATCH "VERSION=[^ ]*$.*" FFMPEG_VER "${VER}") +list(GET FFMPEG_VER 0 FFMPEG_VER) +string(SUBSTRING "${FFMPEG_VER}" 8 -1 FFMPEG_VER) +string(REGEX MATCH "BASE_URL=([^ ]*)" FFMPEG_BASE_URL "${VER}") +list(GET FFMPEG_BASE_URL 0 FFMPEG_BASE_URL) +string(SUBSTRING "${FFMPEG_BASE_URL}" 9 -1 FFMPEG_BASE_URL) + + if(ENABLE_INTERNAL_FFMPEG) - include(ExternalProject) - file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FFMPEG-VERSION VER) - string(REGEX MATCH "VERSION=[^ ]*$.*" FFMPEG_VER "${VER}") - list(GET FFMPEG_VER 0 FFMPEG_VER) - string(SUBSTRING "${FFMPEG_VER}" 8 -1 FFMPEG_VER) - string(REGEX MATCH "BASE_URL=([^ ]*)" FFMPEG_BASE_URL "${VER}") - list(GET FFMPEG_BASE_URL 0 FFMPEG_BASE_URL) - string(SUBSTRING "${FFMPEG_BASE_URL}" 9 -1 FFMPEG_BASE_URL) + if(FFMPEG_PATH) + message(WARNING "Internal FFmpeg enabled, but FFMPEG_PATH given, ignoring") + endif() externalproject_add(ffmpeg URL ${FFMPEG_BASE_URL}/${FFMPEG_VER}.tar.gz @@ -42,15 +47,20 @@ fi") -DUSE_STATIC_FFMPEG=1) set(FFMPEG_FOUND 1) else() + if(FFMPEG_PATH) + set(ENV{PKG_CONFIG_PATH} "${FFMPEG_PATH}/lib/pkgconfig") + endif() set(FFMPEG_PKGS libavcodec>=56.26.100 libavfilter>=5.11.100 libavformat>=56.25.101 libavutil>=54.20.100 libswscale>=3.1.101 libswresample>=1.1.100 libpostproc>=53.3.100) if(PKG_CONFIG_FOUND) pkg_check_modules (FFMPEG ${FFMPEG_PKGS}) + set(FFMPEG_LIBRARIES "${FFMPEG_LDFLAGS}") endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(FFMPEG DEFAULT_MSG FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES) set(FFMPEG_FOUND 1) + list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VER}\") endif() mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES FFMPEG_DEFINITIONS FFMPEG_FOUND) diff --git a/project/cmake/treedata/common/network.txt b/project/cmake/treedata/common/network.txt index 64a87d56598fb..c0ec4a3861b76 100644 --- a/project/cmake/treedata/common/network.txt +++ b/project/cmake/treedata/common/network.txt @@ -1,4 +1,5 @@ xbmc/network network +xbmc/network/dacp network/dacp xbmc/network/httprequesthandler network/httprequesthandler xbmc/network/httprequesthandler/python network/httprequesthandler/python xbmc/network/upnp network/upnp diff --git a/project/cmake/treedata/common/subdirs.txt b/project/cmake/treedata/common/subdirs.txt index 8d7bf230157c4..7687490b3658d 100644 --- a/project/cmake/treedata/common/subdirs.txt +++ b/project/cmake/treedata/common/subdirs.txt @@ -10,6 +10,7 @@ xbmc/input input xbmc/listproviders listproviders xbmc/media media xbmc/messaging messaging +xbmc/messaging/helpers messagingHelpers xbmc/pictures pictures xbmc/playlists playlists xbmc/powermanagement powermanagement diff --git a/tools/depends/native/TexturePacker/CMakeLists.txt b/tools/depends/native/TexturePacker/CMakeLists.txt index 3e3aee2455912..4090925cc177a 100644 --- a/tools/depends/native/TexturePacker/CMakeLists.txt +++ b/tools/depends/native/TexturePacker/CMakeLists.txt @@ -24,9 +24,15 @@ if(GIF_VERSION LESS 4) message(FATAL_ERROR "giflib < 4 not supported") else() file(STRINGS ${GIF_INCLUDE_DIR}/gif_lib.h GIFSTRINGS) - string(REGEX MATCH GIFLIB_MAJOR ([0-9]*) GIFLIB_MAJOR ${GIFSTRINGS}) - if(NOT GIFLIB_MAJOR) - message(WARNING "giflib4 support is experimental. Consider updating to giflib5") + string(REGEX MATCH "GIFLIB_MAJOR ([0-9])" GIFLIB_MAJOR ${GIFSTRINGS}) + if(GIFLIB_MAJOR) + separate_arguments(GIFLIB_MAJOR) + list(GET GIFLIB_MAJOR 1 GIFLIB_MAJOR) + else() + set(GIFLIB_MAJOR ${GIF_VERSION}) + endif() + if(NOT GIFLIB_MAJOR OR GIFLIB_MAJOR LESS 5) + message(WARNING "giflib${GIFLIB_MAJOR} support is experimental. Consider updating to giflib5") endif() endif() diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt index c8be721a23ca8..a013f7f4b89b6 100644 --- a/tools/depends/target/ffmpeg/CMakeLists.txt +++ b/tools/depends/target/ffmpeg/CMakeLists.txt @@ -17,6 +17,12 @@ if(GNUTLS_FOUND) list(APPEND ffmpeg_conf --enable-gnutls) endif() +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + set(PARALLEL_FLAGS -j${N}) +endif() + include(ExternalProject) externalproject_add(ffmpeg SOURCE_DIR ${CMAKE_SOURCE_DIR} @@ -53,7 +59,7 @@ externalproject_add(ffmpeg --cc=${CMAKE_C_COMPILER} --prefix=${CMAKE_INSTALL_PREFIX} ${ffmpeg_conf} - BUILD_COMMAND make) + BUILD_COMMAND make ${PARALLEL_FLAGS}) install(CODE "Message(Done)") diff --git a/xbmc/cores/AudioEngine/CMakeLists.txt b/xbmc/cores/AudioEngine/CMakeLists.txt index 37e82d44f3ba1..cb682effe32fd 100644 --- a/xbmc/cores/AudioEngine/CMakeLists.txt +++ b/xbmc/cores/AudioEngine/CMakeLists.txt @@ -46,4 +46,4 @@ endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}) core_add_library(audioengine) -add_dependencies(audioengine ffmpeg) +add_dependencies(audioengine libcpluff ffmpeg) diff --git a/xbmc/cores/paplayer/CMakeLists.txt b/xbmc/cores/paplayer/CMakeLists.txt index 5df01ac4e6397..7953d515182f7 100644 --- a/xbmc/cores/paplayer/CMakeLists.txt +++ b/xbmc/cores/paplayer/CMakeLists.txt @@ -4,4 +4,4 @@ set(SOURCES AudioDecoder.cpp VideoPlayerCodec.cpp) core_add_library(paplayer) -add_dependencies(paplayer ffmpeg) +add_dependencies(paplayer libcpluff ffmpeg) diff --git a/xbmc/events/CMakeLists.txt b/xbmc/events/CMakeLists.txt index 7a5aefa1f69f1..78ab0c051738f 100644 --- a/xbmc/events/CMakeLists.txt +++ b/xbmc/events/CMakeLists.txt @@ -5,3 +5,4 @@ set(SOURCES AddonEvent.cpp MediaLibraryEvent.cpp) core_add_library(events) +add_dependencies(events libcpluff) diff --git a/xbmc/guilib/CMakeLists.txt b/xbmc/guilib/CMakeLists.txt index a305891da56f9..8c6accb4d45cf 100644 --- a/xbmc/guilib/CMakeLists.txt +++ b/xbmc/guilib/CMakeLists.txt @@ -1,5 +1,4 @@ -set(SOURCES AnimatedGif.cpp - cximage.cpp +set(SOURCES cximage.cpp DDSImage.cpp DirectXGraphics.cpp DirtyRegionSolvers.cpp diff --git a/xbmc/messaging/helpers/CMakeLists.txt b/xbmc/messaging/helpers/CMakeLists.txt new file mode 100644 index 0000000000000..299896d8c1950 --- /dev/null +++ b/xbmc/messaging/helpers/CMakeLists.txt @@ -0,0 +1,3 @@ +set(SOURCES DialogHelper.cpp) + +core_add_library(messagingHelpers) diff --git a/xbmc/music/tags/CMakeLists.txt b/xbmc/music/tags/CMakeLists.txt index d1572ac22d60d..1b102a125eea8 100644 --- a/xbmc/music/tags/CMakeLists.txt +++ b/xbmc/music/tags/CMakeLists.txt @@ -2,6 +2,7 @@ set(SOURCES MusicInfoTag.cpp MusicInfoTagLoaderCDDA.cpp MusicInfoTagLoaderDatabase.cpp MusicInfoTagLoaderFactory.cpp + MusicInfoTagLoaderFFmpeg.cpp MusicInfoTagLoaderShn.cpp ReplayGain.cpp TagLibVFSStream.cpp diff --git a/xbmc/network/dacp/CMakeLists.txt b/xbmc/network/dacp/CMakeLists.txt new file mode 100644 index 0000000000000..f7028f0cb730a --- /dev/null +++ b/xbmc/network/dacp/CMakeLists.txt @@ -0,0 +1,3 @@ +set(SOURCES dacp.cpp) + +core_add_library(network_dacp) diff --git a/xbmc/threads/CMakeLists.txt b/xbmc/threads/CMakeLists.txt index 0cec69aca360d..7c8cfb17b6eac 100644 --- a/xbmc/threads/CMakeLists.txt +++ b/xbmc/threads/CMakeLists.txt @@ -1,6 +1,5 @@ set(SOURCES Atomics.cpp Event.cpp - LockFree.cpp Thread.cpp Timer.cpp SystemClock.cpp