diff options
author | montellese <montellese@kodi.tv> | 2016-11-06 11:02:10 +0100 |
---|---|---|
committer | montellese <montellese@kodi.tv> | 2020-04-16 20:05:38 +0200 |
commit | b97635702e3ddcaa8a27178d320cd2aadf147d8a (patch) | |
tree | 41cae1d1ff3514a9726683564ceb33d1bc2f2358 | |
parent | 07e40f7f790dd7f4f884cf37b9979303bc68c62b (diff) |
[cmake/depends/win32] add spdlog
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | cmake/modules/FindSpdlog.cmake | 104 | ||||
-rw-r--r-- | docs/README.Linux.md | 11 | ||||
-rw-r--r-- | docs/README.Ubuntu.md | 2 | ||||
-rw-r--r-- | project/BuildDependencies/scripts/0_package.target-win10-arm.list | 1 | ||||
-rw-r--r-- | project/BuildDependencies/scripts/0_package.target-win10-win32.list | 1 | ||||
-rw-r--r-- | project/BuildDependencies/scripts/0_package.target-win10-x64.list | 1 | ||||
-rw-r--r-- | project/BuildDependencies/scripts/0_package.target-win32.list | 1 | ||||
-rw-r--r-- | project/BuildDependencies/scripts/0_package.target-x64.list | 1 | ||||
-rw-r--r-- | tools/buildsteps/freebsd/configure-xbmc | 2 | ||||
-rw-r--r-- | tools/depends/.gitignore | 1 | ||||
-rw-r--r-- | tools/depends/target/Makefile | 3 | ||||
-rw-r--r-- | tools/depends/target/libspdlog/Makefile | 69 | ||||
-rw-r--r-- | xbmc/interfaces/swig/CMakeLists.txt | 1 |
15 files changed, 196 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index a3b46cafa4..fb9e08307f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,7 +70,7 @@ install: gettext git-core gperf libasound2-dev libass-dev libbluray-dev libbz2-dev libcap-dev libcdio-dev libcec4-dev libcrossguid-dev libcurl3 libcurl4-openssl-dev libdbus-1-dev libegl1-mesa-dev libfmt3-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libfstrcmp-dev libgif-dev libgl1-mesa-dev libglu1-mesa-dev libiso9660-dev libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmysqlclient-dev libnfs-dev - libpcre3-dev libplist-dev libpng-dev libpulse-dev libsmbclient-dev libsqlite3-dev + libpcre3-dev libplist-dev libpng-dev libpulse-dev libsmbclient-dev libspdlog-dev libsqlite3-dev libssl-dev libtag1-dev libtinyxml-dev libtool libudev-dev libusb-dev libva-dev libvdpau-dev libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxslt1-dev libxt-dev mesa-utils nasm ninja-build pmount python-dev python-imaging python-pip3 python-sqlite rapidjson-dev swig unzip uuid-dev yasm zip zlib1g-dev; diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e5fad9f49..a555ac7803 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,7 @@ if(UNIX) option(ENABLE_INTERNAL_DAV1D "Enable internal dav1d?" OFF) option(ENABLE_INTERNAL_GTEST "Enable internal gtest?" OFF) option(ENABLE_INTERNAL_UDFREAD "Enable internal udfread?" OFF) + option(ENABLE_INTERNAL_SPDLOG "Enable internal spdlog?" OFF) endif() # System options if(NOT WIN32) @@ -129,6 +130,7 @@ set(required_deps ASS OpenSSL>=1.0.2 PCRE RapidJSON + Spdlog Sqlite3 TagLib TinyXML @@ -286,7 +288,7 @@ elseif(CORE_SYSTEM_NAME STREQUAL android) ${CORE_BUILD_DIR}/DllPaths_generated_android.h @ONLY) endif() -set(GLOBAL_TARGET_DEPS ffmpeg dvdnav crossguid fmt fstrcmp flatbuffers ${PLATFORM_GLOBAL_TARGET_DEPS}) +set(GLOBAL_TARGET_DEPS ffmpeg dvdnav crossguid fmt Spdlog::Spdlog fstrcmp flatbuffers ${PLATFORM_GLOBAL_TARGET_DEPS}) # main library (used for main binary and tests) add_library(lib${APP_NAME_LC} STATIC $<TARGET_OBJECTS:compileinfo>) diff --git a/cmake/modules/FindSpdlog.cmake b/cmake/modules/FindSpdlog.cmake new file mode 100644 index 0000000000..d8d5d017a3 --- /dev/null +++ b/cmake/modules/FindSpdlog.cmake @@ -0,0 +1,104 @@ +# FindSpdlog +# ------- +# Finds the Spdlog library +# +# This will define the following variables: +# +# SPDLOG_FOUND - system has Spdlog +# SPDLOG_INCLUDE_DIRS - the Spdlog include directory +# SPDLOG_LIBRARIES - the Spdlog libraries +# SPDLOG_DEFINITIONS - the Spdlog compile definitions +# +# and the following imported targets: +# +# Spdlog::Spdlog - The Spdlog library + +if(ENABLE_INTERNAL_SPDLOG) + include(ExternalProject) + file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/libspdlog/Makefile VER REGEX "^[ ]*VERSION[ ]*=.+$") + string(REGEX REPLACE "^[ ]*VERSION[ ]*=[ ]*" "" SPDLOG_VERSION "${VER}") + + # allow user to override the download URL with a local tarball + # needed for offline build envs + if(SPDLOG_URL) + get_filename_component(SPDLOG_URL "${SPDLOG_URL}" ABSOLUTE) + else() + set(SPDLOG_URL http://mirrors.kodi.tv/build-deps/sources/spdlog-${SPDLOG_VERSION}.tar.gz) + endif() + if(VERBOSE) + message(STATUS "SPDLOG_URL: ${SPDLOG_URL}") + endif() + + if(APPLE) + set(EXTRA_ARGS "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}") + endif() + + set(SPDLOG_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/libspdlog.a) + set(SPDLOG_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include) + externalproject_add(spdlog + URL ${SPDLOG_URL} + DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download + PREFIX ${CORE_BUILD_DIR}/spdlog + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} + -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS} + -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_INSTALL_LIBDIR=lib + -DSPDLOG_BUILD_EXAMPLE=OFF + -DSPDLOG_BUILD_TESTS=OFF + -DSPDLOG_BUILD_BENCH=OFF + -DSPDLOG_FMT_EXTERNAL=ON + "${EXTRA_ARGS}" + BUILD_BYPRODUCTS ${SPDLOG_LIBRARY}) + set_target_properties(spdlog PROPERTIES FOLDER "External Projects") + + if(ENABLE_INTERNAL_FMT) + add_dependencies(spdlog fmt) + endif() +else() + find_package(spdlog 1.5.0 CONFIG REQUIRED QUIET) + + if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_SPDLOG spdlog QUIET) + set(SPDLOG_VERSION ${PC_SPDLOG_VERSION}) + endif() + + find_path(SPDLOG_INCLUDE_DIR NAMES spdlog/spdlog.h + PATHS ${PC_SPDLOG_INCLUDEDIR}) + + find_library(SPDLOG_LIBRARY_RELEASE NAMES spdlog + PATHS ${PC_SPDLOG_LIBDIR}) + find_library(SPDLOG_LIBRARY_DEBUG NAMES spdlogd + PATHS ${PC_SPDLOG_LIBDIR}) + + include(SelectLibraryConfigurations) + select_library_configurations(SPDLOG) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Spdlog + REQUIRED_VARS SPDLOG_LIBRARY SPDLOG_INCLUDE_DIR + VERSION_VAR SPDLOG_VERSION) + +if(SPDLOG_FOUND) + set(SPDLOG_LIBRARIES ${SPDLOG_LIBRARY}) + set(SPDLOG_INCLUDE_DIRS ${SPDLOG_INCLUDE_DIR}) + set(SPDLOG_DEFINITIONS -DSPDLOG_FMT_EXTERNAL + -DSPDLOG_DEBUG_ON + -DSPDLOG_NO_ATOMIC_LEVELS + -DSPDLOG_ENABLE_PATTERN_PADDING) + if(WIN32) + list(APPEND SPDLOG_DEFINITIONS -DSPDLOG_WCHAR_FILENAMES + -DSPDLOG_WCHAR_TO_UTF8_SUPPORT) + endif() + + if(NOT TARGET Spdlog::Spdlog) + add_library(Spdlog::Spdlog UNKNOWN IMPORTED) + set_target_properties(Spdlog::Spdlog PROPERTIES + IMPORTED_LOCATION "${SPDLOG_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${SPDLOG_INCLUDE_DIR}" + INTERFACE_COMPILE_DEFINITIONS "${SPDLOG_DEFINITIONS}") + endif() +endif() + +mark_as_advanced(SPDLOG_INCLUDE_DIR SPDLOG_LIBRARY) diff --git a/docs/README.Linux.md b/docs/README.Linux.md index 11fa5ae009..73afac904b 100644 --- a/docs/README.Linux.md +++ b/docs/README.Linux.md @@ -74,10 +74,10 @@ The following is the list of packages that are used to build Kodi on Debian/Ubun **NOTE:** Kodi requires a compiler with C++14 support, i.e. gcc >= 4.9 or clang >= 3.4 -* autoconf, automake, autopoint, gettext, autotools-dev, cmake, curl, default-jre | openjdk-6-jre | openjdk-7-jre, gawk, gcc (>= 4.9) | gcc-4.9, g++ (>= 4.9) | g++-4.9, cpp (>= 4.9) | cpp-4.9, flatbuffers, gdc, gperf, libasound2-dev | libasound-dev, libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, libbluray-dev, libbz2-dev, libcdio-dev, libcec4-dev | libcec-dev, libp8-platform-dev, libcrossguid-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libenca-dev, libflac-dev, libfontconfig-dev, libfmt3-dev | libfmt-dev, libfreetype6-dev, libfribidi-dev, libfstrcmp-dev, libgcrypt-dev, libgif-dev (>= 5.0.5), libgles2-mesa-dev [armel] | libgl1-mesa-dev | libgl-dev, libglew-dev, libglu1-mesa-dev | libglu-dev, libgnutls-dev | libgnutls28-dev, libgpg-error-dev, libiso9660-dev, libjpeg-dev, liblcms2-dev, liblirc-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, libmysqlclient-dev, libnfs-dev, libogg-dev, libomxil-bellagio-dev [armel], libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, libshairplay-dev, libsmbclient-dev, libsqlite3-dev, libssl-dev, libtag1-dev (>= 1.8) | libtag1x8, libtiff5-dev | libtiff-dev | libtiff4-dev, libtinyxml-dev, libtool, libudev-dev, libva-dev, libvdpau-dev, libvorbis-dev, libxkbcommon-dev, libxmu-dev, libxrandr-dev, libxslt1-dev | libxslt-dev, libxt-dev, waylandpp-dev | netcat, wayland-protocols | wipe, lsb-release, meson (>= 0.47.0), nasm (>= 2.14), ninja-build, python3-dev, python3-pil | python-imaging, python-support | python3-minimal, rapidjson-dev, swig, unzip, uuid-dev, yasm, zip, zlib1g-dev +* autoconf, automake, autopoint, gettext, autotools-dev, cmake, curl, default-jre | openjdk-6-jre | openjdk-7-jre, gawk, gcc (>= 4.9) | gcc-4.9, g++ (>= 4.9) | g++-4.9, cpp (>= 4.9) | cpp-4.9, flatbuffers, gdc, gperf, libasound2-dev | libasound-dev, libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, libbluray-dev, libbz2-dev, libcdio-dev, libcec4-dev | libcec-dev, libp8-platform-dev, libcrossguid-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, libcwiid-dev, libdbus-1-dev, libegl1-mesa-dev, libenca-dev, libflac-dev, libfontconfig-dev, libfmt3-dev | libfmt-dev, libfreetype6-dev, libfribidi-dev, libfstrcmp-dev, libgcrypt-dev, libgif-dev (>= 5.0.5), libgles2-mesa-dev [armel] | libgl1-mesa-dev | libgl-dev, libglew-dev, libglu1-mesa-dev | libglu-dev, libgnutls-dev | libgnutls28-dev, libgpg-error-dev, libiso9660-dev, libjpeg-dev, liblcms2-dev, liblirc-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, libmysqlclient-dev, libnfs-dev, libogg-dev, libomxil-bellagio-dev [armel], libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, libshairplay-dev, libsmbclient-dev, libspdlog-dev, libsqlite3-dev, libssl-dev, libtag1-dev (>= 1.8) | libtag1x8, libtiff5-dev | libtiff-dev | libtiff4-dev, libtinyxml-dev, libtool, libudev-dev, libva-dev, libvdpau-dev, libvorbis-dev, libxkbcommon-dev, libxmu-dev, libxrandr-dev, libxslt1-dev | libxslt-dev, libxt-dev, waylandpp-dev | netcat, wayland-protocols | wipe, lsb-release, meson (>= 0.47.0), nasm (>= 2.14), ninja-build, python3-dev, python3-pil | python-imaging, python-support | python3-minimal, rapidjson-dev, swig, unzip, uuid-dev, yasm, zip, zlib1g-dev ### 3.1. Build missing dependencies -Some packages may be missing or outdated in older distributions. Notably `crossguid, libfmt, waylandpp, wayland-protocols, etc.` are known to be outdated or missing. Fortunately there is an easy way to build individual dependencies with **[Kodi's unified depends build system](../tools/depends/README.md)**. +Some packages may be missing or outdated in older distributions. Notably `crossguid`, `libfmt`, `libspdlog`, `waylandpp`, `wayland-protocols`, etc. are known to be outdated or missing. Fortunately there is an easy way to build individual dependencies with **[Kodi's unified depends build system](../tools/depends/README.md)**. Change to Kodi's source code directory: ``` @@ -99,6 +99,11 @@ Build and install libfmt: sudo make -C tools/depends/target/libfmt PREFIX=/usr/local ``` +Build and install libspdlog: +``` +sudo make -C tools/depends/target/libspdlog PREFIX=/usr/local +``` + Build and install wayland-protocols: ``` sudo make -C tools/depends/target/wayland-protocols PREFIX=/usr/local @@ -114,7 +119,7 @@ sudo make -C tools/depends/target/waylandpp PREFIX=/usr/local **TIP:** Complete list of dependencies is available **[here](https://github.com/xbmc/xbmc/tree/master/tools/depends/target)**. ### 3.2. Enable internal dependencies -Some dependencies can be configured to build before Kodi. That's the case with `flatbuffers`, `crossguid, libfmt, rapidjson and dav1d`. To enable the internal build of a dependency, append `-DENABLE_INTERNAL_<DEPENDENCY_NAME>=ON` to the configure command below. For example, configuring an X11 build with internal `fmt` would become `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FMT=ON` instead of `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local`. +Some dependencies can be configured to build before Kodi. That's the case with `flatbuffers`, `crossguid`, `libfmt`, `libspdlog`, `rapidjson` and `dav1d`. To enable the internal build of a dependency, append `-DENABLE_INTERNAL_<DEPENDENCY_NAME>=ON` to the configure command below. For example, configuring an X11 build with internal `fmt` would become `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FMT=ON` instead of `cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local`. **[back to top](#table-of-contents)** | **[back to section top](#3-installing-the-required-packages)** diff --git a/docs/README.Ubuntu.md b/docs/README.Ubuntu.md index f57a455087..6ebef3732d 100644 --- a/docs/README.Ubuntu.md +++ b/docs/README.Ubuntu.md @@ -116,7 +116,7 @@ If you get a `package not found` type of message with the below command, remove Install build dependencies manually: ``` -sudo apt install debhelper autoconf automake autopoint gettext autotools-dev cmake curl default-jre doxygen gawk gcc gdc gperf libasound2-dev libass-dev libavahi-client-dev libavahi-common-dev libbluetooth-dev libbluray-dev libbz2-dev libcdio-dev libp8-platform-dev libcrossguid-dev libcurl4-openssl-dev libcwiid-dev libdbus-1-dev libegl1-mesa-dev libenca-dev libflac-dev flatbuffers-dev libfmt-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libfstrcmp-dev libgcrypt-dev libgif-dev libgles2-mesa-dev libgl1-mesa-dev libglu1-mesa-dev libgnutls28-dev libgpg-error-dev libiso9660-dev libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmysqlclient-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libshairplay-dev libsmbclient-dev libsqlite3-dev libssl-dev libtag1-dev libtiff5-dev libtinyxml-dev libtool libudev-dev libva-dev libvdpau-dev libvorbis-dev libxmu-dev libxrandr-dev libxslt1-dev libxt-dev lsb-release meson nasm ninja-build python3-dev python3-pil python3-pip rapidjson-dev swig unzip uuid-dev yasm zip zlib1g-dev +sudo apt install debhelper autoconf automake autopoint gettext autotools-dev cmake curl default-jre doxygen gawk gcc gdc gperf libasound2-dev libass-dev libavahi-client-dev libavahi-common-dev libbluetooth-dev libbluray-dev libbz2-dev libcdio-dev libp8-platform-dev libcrossguid-dev libcurl4-openssl-dev libcwiid-dev libdbus-1-dev libegl1-mesa-dev libenca-dev libflac-dev flatbuffers-dev libfmt-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libfstrcmp-dev libgcrypt-dev libgif-dev libgles2-mesa-dev libgl1-mesa-dev libglu1-mesa-dev libgnutls28-dev libgpg-error-dev libiso9660-dev libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmysqlclient-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libshairplay-dev libsmbclient-dev libspdlog-dev libsqlite3-dev libssl-dev libtag1-dev libtiff5-dev libtinyxml-dev libtool libudev-dev libva-dev libvdpau-dev libvorbis-dev libxmu-dev libxrandr-dev libxslt1-dev libxt-dev lsb-release meson nasm ninja-build python3-dev python3-pil python3-pip rapidjson-dev swig unzip uuid-dev yasm zip zlib1g-dev ``` **WARNING:** Make sure you copy paste the entire line or you might receive an error or miss a few dependencies. diff --git a/project/BuildDependencies/scripts/0_package.target-win10-arm.list b/project/BuildDependencies/scripts/0_package.target-win10-arm.list index fb7e72b03b..97ba934335 100644 --- a/project/BuildDependencies/scripts/0_package.target-win10-arm.list +++ b/project/BuildDependencies/scripts/0_package.target-win10-arm.list @@ -35,6 +35,7 @@ pillow-6.2.1-win10-arm-v141-20200105.7z pycryptodome-3.9.4-win10-arm-v141-20200110.7z python-3.7.5-win10-arm-v141-20200105.7z rapidjson-1.1.0-20200105.7z +spdlog-1.5.0-win10-arm-v141-20200320-2.7z sqlite-3300100-win10-arm-v141-20200105.7z taglib-1.11.1-win10-arm-v141-20200105.7z tinyxml-2.6.2-win10-arm-v141-20200105.7z diff --git a/project/BuildDependencies/scripts/0_package.target-win10-win32.list b/project/BuildDependencies/scripts/0_package.target-win10-win32.list index 52e38e93aa..d70422581f 100644 --- a/project/BuildDependencies/scripts/0_package.target-win10-win32.list +++ b/project/BuildDependencies/scripts/0_package.target-win10-win32.list @@ -35,6 +35,7 @@ pillow-6.2.1-win10-win32-v141-20200105.7z pycryptodome-3.9.4-win10-win32-v141-20200110.7z python-3.7.5-win10-win32-v141-20200105.7z rapidjson-1.1.0-20200105.7z +spdlog-1.5.0-win10-win32-v141-20200320-2.7z sqlite-3300100-win10-win32-v141-20200105.7z taglib-1.11.1-win10-win32-v141-20200105.7z tinyxml-2.6.2-win10-win32-v141-20200105.7z diff --git a/project/BuildDependencies/scripts/0_package.target-win10-x64.list b/project/BuildDependencies/scripts/0_package.target-win10-x64.list index 99cef44952..c4f3053ad3 100644 --- a/project/BuildDependencies/scripts/0_package.target-win10-x64.list +++ b/project/BuildDependencies/scripts/0_package.target-win10-x64.list @@ -35,6 +35,7 @@ pillow-6.2.1-win10-x64-v141-20200105.7z pycryptodome-3.9.4-win10-x64-v141-20200110.7z python-3.7.5-win10-x64-v141-20200105.7z rapidjson-1.1.0-20200105.7z +spdlog-1.5.0-win10-x64-v141-20200320.7z sqlite-3300100-win10-x64-v141-20200105.7z taglib-1.11.1-win10-x64-v141-20200105.7z tinyxml-2.6.2-win10-x64-v141-20200105.7z diff --git a/project/BuildDependencies/scripts/0_package.target-win32.list b/project/BuildDependencies/scripts/0_package.target-win32.list index fb690a3c4e..189a1d0a5b 100644 --- a/project/BuildDependencies/scripts/0_package.target-win32.list +++ b/project/BuildDependencies/scripts/0_package.target-win32.list @@ -43,6 +43,7 @@ pycryptodome-3.9.4-win32-v141-20200110.7z python-3.7.5-win32-v141-20200105.7z rapidjson-1.1.0-20200105.7z shairplay-ce80e00-win32-v141-20200105.7z +spdlog-1.5.0-win32-v141-20200320-2.7z sqlite-3300100-win32-v141-20200105.7z taglib-1.11.1-win32-v141-20200105.7z tinyxml-2.6.2-win32-v141-20200105.7z diff --git a/project/BuildDependencies/scripts/0_package.target-x64.list b/project/BuildDependencies/scripts/0_package.target-x64.list index 25794a6690..e78c50293b 100644 --- a/project/BuildDependencies/scripts/0_package.target-x64.list +++ b/project/BuildDependencies/scripts/0_package.target-x64.list @@ -40,6 +40,7 @@ pycryptodome-3.9.4-x64-v141-20200110.7z python-3.7.5-x64-v141-20200105.7z rapidjson-1.1.0-20200105.7z shairplay-ce80e00-x64-v141-20200105.7z +spdlog-1.5.0-x64-v141-20200320.7z sqlite-3300100-x64-v141-20200105.7z taglib-1.11.1-x64-v141-20200105.7z tinyxml-2.6.2-x64-v141-20200105.7z diff --git a/tools/buildsteps/freebsd/configure-xbmc b/tools/buildsteps/freebsd/configure-xbmc index 0c069d2742..0fe6f3b986 100644 --- a/tools/buildsteps/freebsd/configure-xbmc +++ b/tools/buildsteps/freebsd/configure-xbmc @@ -5,4 +5,4 @@ XBMC_PLATFORM_DIR=freebsd mkdir -p $WORKSPACE/build cd $WORKSPACE/build -cmake -DCMAKE_BUILD_TYPE=$Configuration .. +cmake -DCMAKE_BUILD_TYPE=$Configuration -DENABLE_INTERNAL_SPDLOG=ON .. diff --git a/tools/depends/.gitignore b/tools/depends/.gitignore index 04c3de2166..b21db94389 100644 --- a/tools/depends/.gitignore +++ b/tools/depends/.gitignore @@ -51,3 +51,4 @@ config.site.native /target/libfmt/fmt-*.tar.gz /target/rapidjson/rapidjson-*.tar.gz /target/flatbuffers/*.tar.gz +/target/libspdlog/spdlog-*.tar.gz diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index 41b39a2735..a0481c4add 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -10,7 +10,7 @@ DEPENDS = \ openssl gmp nettle gnutls curl nghttp2 \ libjpeg-turbo libpng fribidi libass \ libxml2 rapidjson libmicrohttpd mariadb libffi \ - python3 libshairplay libfmt \ + python3 libshairplay libfmt libspdlog \ libplist libcec libbluray tinyxml \ taglib libusb libnfs meson-cross-file \ pythonmodule-pil pythonmodule-pycryptodome pythonmodule-setuptools \ @@ -117,6 +117,7 @@ libevdev: libudev samba-gplv3: gnutls taglib: $(ZLIB) dav1d: meson-cross-file +libspdlog: libfmt .installed-$(PLATFORM): $(DEPENDS) touch $@ diff --git a/tools/depends/target/libspdlog/Makefile b/tools/depends/target/libspdlog/Makefile new file mode 100644 index 0000000000..69a396f876 --- /dev/null +++ b/tools/depends/target/libspdlog/Makefile @@ -0,0 +1,69 @@ +-include ../../Makefile.include +DEPS = Makefile + +# lib name, version +LIBNAME=spdlog +VERSION=1.5.0 +SOURCE=$(LIBNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.gz + +CMAKE_OPTIONS= \ + -DSPDLOG_BUILD_EXAMPLE=OFF \ + -DSPDLOG_BUILD_TESTS=OFF \ + -DSPDLOG_BUILD_BENCH=OFF \ + -DSPDLOG_INSTALL=ON \ + -DSPDLOG_FMT_EXTERNAL=ON + +ifeq ($(CROSS_COMPILING), yes) + DEPS += ../../Makefile.include +else + CXXFLAGS += -std=c++14 + ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + + ifeq ($(PLATFORM),) + PLATFORM = native + TARBALLS_LOCATION = $(ROOT_DIR) + BASE_URL := http://mirrors.kodi.tv/build-deps/sources + RETRIEVE_TOOL := curl + RETRIEVE_TOOL_FLAGS := -Ls --create-dirs -f -O + ARCHIVE_TOOL := tar + ARCHIVE_TOOL_FLAGS := --strip-components=1 -xf + CMAKE := cmake -DCMAKE_INSTALL_PREFIX=$(PREFIX) + endif +endif + +LIBDYLIB=$(PLATFORM)/build/libspdlog.a + +.PHONY: .installed-native + +all: .installed-$(PLATFORM) + +download: $(TARBALLS_LOCATION)/$(ARCHIVE) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) +ifeq ($(PREFIX),) + @echo + @echo "ERROR: please set PREFIX to the kodi install path e.g. make PREFIX=/usr/local" + @exit 1 +endif + rm -rf $(PLATFORM); mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); rm -rf build; mkdir -p build + cd $(PLATFORM)/build; $(CMAKE) $(CMAKE_OPTIONS) .. + +$(LIBDYLIB): $(PLATFORM) + $(MAKE) -C $(PLATFORM)/build + +.installed-$(PLATFORM): $(PLATFORM) + $(MAKE) -C $(PLATFORM)/build install + touch $@ + +clean: + $(MAKE) -C $(PLATFORM)/build clean + rm -f .installed-$(PLATFORM) + +distclean: + rm -rf $(PLATFORM) .installed-$(PLATFORM) diff --git a/xbmc/interfaces/swig/CMakeLists.txt b/xbmc/interfaces/swig/CMakeLists.txt index fc738219e5..3abe31a3f5 100644 --- a/xbmc/interfaces/swig/CMakeLists.txt +++ b/xbmc/interfaces/swig/CMakeLists.txt @@ -49,6 +49,7 @@ add_library(python_binding STATIC ${SOURCES}) set_target_properties(python_binding PROPERTIES POSITION_INDEPENDENT_CODE TRUE FOLDER "Build Utilities") set(core_DEPENDS python_binding ${core_DEPENDS} CACHE STRING "" FORCE) +add_dependencies(python_binding ${GLOBAL_TARGET_DEPS}) if(CORE_SYSTEM_NAME STREQUAL windowsstore) set_target_properties(python_binding PROPERTIES STATIC_LIBRARY_FLAGS "/ignore:4264") |