Skip to content

Commit

Permalink
[cmake] fix squashed fixes, squash me later
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnipex authored and FernetMenta committed Sep 20, 2015
1 parent 290c497 commit a6c3742
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 18 deletions.
10 changes: 10 additions & 0 deletions 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)
1 change: 1 addition & 0 deletions project/cmake/CMakeLists.txt
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion project/cmake/modules/FindCpluff.cmake
Expand Up @@ -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
Expand Down
26 changes: 18 additions & 8 deletions 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
Expand Down Expand Up @@ -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)
1 change: 1 addition & 0 deletions 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
Expand Down
1 change: 1 addition & 0 deletions project/cmake/treedata/common/subdirs.txt
Expand Up @@ -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
Expand Down
12 changes: 9 additions & 3 deletions tools/depends/native/TexturePacker/CMakeLists.txt
Expand Up @@ -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()

Expand Down
8 changes: 7 additions & 1 deletion tools/depends/target/ffmpeg/CMakeLists.txt
Expand Up @@ -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}
Expand Down Expand Up @@ -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)")

Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/AudioEngine/CMakeLists.txt
Expand Up @@ -46,4 +46,4 @@ endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

core_add_library(audioengine)
add_dependencies(audioengine ffmpeg)
add_dependencies(audioengine libcpluff ffmpeg)
2 changes: 1 addition & 1 deletion xbmc/cores/paplayer/CMakeLists.txt
Expand Up @@ -4,4 +4,4 @@ set(SOURCES AudioDecoder.cpp
VideoPlayerCodec.cpp)

core_add_library(paplayer)
add_dependencies(paplayer ffmpeg)
add_dependencies(paplayer libcpluff ffmpeg)
1 change: 1 addition & 0 deletions xbmc/events/CMakeLists.txt
Expand Up @@ -5,3 +5,4 @@ set(SOURCES AddonEvent.cpp
MediaLibraryEvent.cpp)

core_add_library(events)
add_dependencies(events libcpluff)
3 changes: 1 addition & 2 deletions xbmc/guilib/CMakeLists.txt
@@ -1,5 +1,4 @@
set(SOURCES AnimatedGif.cpp
cximage.cpp
set(SOURCES cximage.cpp
DDSImage.cpp
DirectXGraphics.cpp
DirtyRegionSolvers.cpp
Expand Down
3 changes: 3 additions & 0 deletions xbmc/messaging/helpers/CMakeLists.txt
@@ -0,0 +1,3 @@
set(SOURCES DialogHelper.cpp)

core_add_library(messagingHelpers)
1 change: 1 addition & 0 deletions xbmc/music/tags/CMakeLists.txt
Expand Up @@ -2,6 +2,7 @@ set(SOURCES MusicInfoTag.cpp
MusicInfoTagLoaderCDDA.cpp
MusicInfoTagLoaderDatabase.cpp
MusicInfoTagLoaderFactory.cpp
MusicInfoTagLoaderFFmpeg.cpp
MusicInfoTagLoaderShn.cpp
ReplayGain.cpp
TagLibVFSStream.cpp
Expand Down
3 changes: 3 additions & 0 deletions xbmc/network/dacp/CMakeLists.txt
@@ -0,0 +1,3 @@
set(SOURCES dacp.cpp)

core_add_library(network_dacp)
1 change: 0 additions & 1 deletion xbmc/threads/CMakeLists.txt
@@ -1,6 +1,5 @@
set(SOURCES Atomics.cpp
Event.cpp
LockFree.cpp
Thread.cpp
Timer.cpp
SystemClock.cpp
Expand Down

0 comments on commit a6c3742

Please sign in to comment.