diff options
Diffstat (limited to 'project/cmake/scripts/linux')
| -rw-r--r-- | project/cmake/scripts/linux/ArchSetup.cmake | 45 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/CodeCoverage.cmake | 97 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/ExtraTargets.cmake | 12 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/Install.cmake | 367 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/Macros.cmake | 95 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/PathSetup.cmake | 39 |
6 files changed, 0 insertions, 655 deletions
diff --git a/project/cmake/scripts/linux/ArchSetup.cmake b/project/cmake/scripts/linux/ArchSetup.cmake deleted file mode 100644 index bcd70df..0000000 --- a/project/cmake/scripts/linux/ArchSetup.cmake +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX) | ||
| 2 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED | ||
| 3 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) | ||
| 4 | set(PLATFORM_DIR linux) | ||
| 5 | set(CMAKE_SYSTEM_NAME Linux) | ||
| 6 | if(WITH_ARCH) | ||
| 7 | set(ARCH ${WITH_ARCH}) | ||
| 8 | else() | ||
| 9 | if(CPU STREQUAL x86_64) | ||
| 10 | set(ARCH x86_64-linux) | ||
| 11 | set(NEON False) | ||
| 12 | elseif(CPU MATCHES "i.86") | ||
| 13 | set(ARCH i486-linux) | ||
| 14 | set(NEON False) | ||
| 15 | add_options(CXX ALL_BUILDS "-msse") | ||
| 16 | elseif(CPU MATCHES arm) | ||
| 17 | set(ARCH arm) | ||
| 18 | set(NEON True) | ||
| 19 | elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64) | ||
| 20 | set(ARCH aarch64) | ||
| 21 | set(NEON False) | ||
| 22 | else() | ||
| 23 | message(SEND_ERROR "Unknown CPU: ${CPU}") | ||
| 24 | endif() | ||
| 25 | endif() | ||
| 26 | |||
| 27 | # Make sure we strip binaries in Release build | ||
| 28 | if(CMAKE_BUILD_TYPE STREQUAL Release AND CMAKE_COMPILER_IS_GNUCXX) | ||
| 29 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") | ||
| 30 | endif() | ||
| 31 | |||
| 32 | find_package(CXX11 REQUIRED) | ||
| 33 | include(LDGOLD) | ||
| 34 | |||
| 35 | # Code Coverage | ||
| 36 | if(CMAKE_BUILD_TYPE STREQUAL Coverage) | ||
| 37 | set(COVERAGE_TEST_BINARY ${APP_NAME_LC}-test) | ||
| 38 | set(COVERAGE_SOURCE_DIR ${CORE_SOURCE_DIR}) | ||
| 39 | set(COVERAGE_DEPENDS "\${APP_NAME_LC}" "\${APP_NAME_LC}-test") | ||
| 40 | set(COVERAGE_EXCLUDES */test/* lib/* */lib/*) | ||
| 41 | endif() | ||
| 42 | |||
| 43 | if(ENABLE_MIR) | ||
| 44 | set(ENABLE_VDPAU OFF CACHE BOOL "Disabling VDPAU since no Mir support" FORCE) | ||
| 45 | endif() | ||
diff --git a/project/cmake/scripts/linux/CodeCoverage.cmake b/project/cmake/scripts/linux/CodeCoverage.cmake deleted file mode 100644 index efc2208..0000000 --- a/project/cmake/scripts/linux/CodeCoverage.cmake +++ /dev/null | |||
| @@ -1,97 +0,0 @@ | |||
| 1 | # - CodeCoverage | ||
| 2 | # Generate code coverage reports with LCOV and GCovr. | ||
| 3 | # | ||
| 4 | # Configuration: | ||
| 5 | # COVERAGE_SOURCE_DIR - Source root directory (default ${CMAKE_SOURCE_DIR}). | ||
| 6 | # COVERAGE_BINARY_DIR - Directory where the coverage reports (and intermediate files) | ||
| 7 | # are generated to. | ||
| 8 | # COVERAGE_EXCLUDES - List of exclude patterns (for example '*/tests/*'). | ||
| 9 | # | ||
| 10 | # The following targets will be generated: | ||
| 11 | # coverage - Builds an html report. Requires LCOV. | ||
| 12 | # coverage_xml - Builds an xml report (in Cobertura format for Jenkins). | ||
| 13 | # Requires Gcovr. | ||
| 14 | # | ||
| 15 | # Inspired by https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake | ||
| 16 | |||
| 17 | # Comiler and linker setup | ||
| 18 | set(CMAKE_C_FLAGS_COVERAGE "-g -O0 --coverage" CACHE STRING | ||
| 19 | "Flags used by the C compiler during coverage builds." FORCE) | ||
| 20 | set(CMAKE_CXX_FLAGS_COVERAGE "-g -O0 --coverage" CACHE STRING | ||
| 21 | "Flags used by the C++ compiler during coverage builds." FORCE) | ||
| 22 | set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "--coverage" CACHE STRING | ||
| 23 | "Flags used for linking binaries during coverage builds." FORCE) | ||
| 24 | set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "--coverage" CACHE STRING | ||
| 25 | "Flags used by the shared libraries linker during coverage builds." FORCE) | ||
| 26 | mark_as_advanced( | ||
| 27 | CMAKE_C_FLAGS_COVERAGE CMAKE_CXX_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_COVERAGE | ||
| 28 | CMAKE_SHARED_LINKER_FLAGS_COVERAGE CMAKE_STATIC_LINKER_FLAGS_COVERAGE | ||
| 29 | ) | ||
| 30 | |||
| 31 | find_program(LCOV_EXECUTABLE lcov) | ||
| 32 | find_program(GENINFO_EXECUTABLE geninfo) | ||
| 33 | find_program(GENHTML_EXECUTABLE genhtml) | ||
| 34 | find_program(GCOVR_EXECUTABLE gcovr) | ||
| 35 | mark_as_advanced(LCOV_EXECUTABLE GENINFO_EXECUTABLE GENHTML_EXECUTABLE GCOVR_EXECUTABLE) | ||
| 36 | |||
| 37 | # Default options | ||
| 38 | if(NOT COVERAGE_SOURCE_DIR) | ||
| 39 | set(COVERAGE_SOURCE_DIR ${CMAKE_SOURCE_DIR}) | ||
| 40 | endif() | ||
| 41 | if(NOT COVERAGE_BINARY_DIR) | ||
| 42 | set(COVERAGE_BINARY_DIR ${CMAKE_BINARY_DIR}/coverage) | ||
| 43 | endif() | ||
| 44 | if(NOT COVERAGE_EXCLUDES) | ||
| 45 | set(COVERAGE_EXCLUDES) | ||
| 46 | endif() | ||
| 47 | |||
| 48 | # Allow variables in COVERAGE_DEPENDS that are not evaluated before this file is included. | ||
| 49 | string(CONFIGURE "${COVERAGE_DEPENDS}" COVERAGE_DEPENDS) | ||
| 50 | |||
| 51 | # Add coverage target that generates an HTML report using LCOV | ||
| 52 | if(LCOV_EXECUTABLE AND GENINFO_EXECUTABLE AND GENHTML_EXECUTABLE) | ||
| 53 | file(MAKE_DIRECTORY ${COVERAGE_BINARY_DIR}) | ||
| 54 | add_custom_target(coverage | ||
| 55 | COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_BINARY_DIR} | ||
| 56 | COMMAND ${LCOV_EXECUTABLE} -z -q -d ${CMAKE_BINARY_DIR} | ||
| 57 | COMMAND ${LCOV_EXECUTABLE} -c -q -i -d ${CMAKE_BINARY_DIR} -b ${COVERAGE_SOURCE_DIR} | ||
| 58 | -o ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage_base.info | ||
| 59 | COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target test || true | ||
| 60 | COMMAND ${LCOV_EXECUTABLE} -c -q -d ${CMAKE_BINARY_DIR} -b ${COVERAGE_SOURCE_DIR} | ||
| 61 | -o ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage_test.info | ||
| 62 | COMMAND ${LCOV_EXECUTABLE} -a ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage_base.info | ||
| 63 | -a ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage_test.info | ||
| 64 | -o ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage.info -q | ||
| 65 | COMMAND ${LCOV_EXECUTABLE} -q -r ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage.info | ||
| 66 | /usr/include/* ${CMAKE_BINARY_DIR}/* ${COVERAGE_EXCLUDES} | ||
| 67 | -o ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage.info | ||
| 68 | COMMAND ${GENHTML_EXECUTABLE} ${COVERAGE_BINARY_DIR}/${PROJECT_NAME}.coverage.info | ||
| 69 | -o ${COVERAGE_BINARY_DIR}/html -s --legend --highlight --demangle-cpp | ||
| 70 | COMMAND ${CMAKE_COMMAND} -E echo "Coverage report: file://${COVERAGE_BINARY_DIR}/html/index.html" | ||
| 71 | WORKING_DIRECTORY ${COVERAGE_BINARY_DIR} | ||
| 72 | VERBATIM | ||
| 73 | DEPENDS ${COVERAGE_DEPENDS} | ||
| 74 | COMMENT "Generate code coverage html report" | ||
| 75 | ) | ||
| 76 | else() | ||
| 77 | message(WARNING "Target coverage not available (lcov, geninfo and genhtml needed).") | ||
| 78 | endif() | ||
| 79 | |||
| 80 | # Add coverage target that generates an XML report using Gcovr | ||
| 81 | if(GCOVR_EXECUTABLE) | ||
| 82 | file(MAKE_DIRECTORY ${COVERAGE_BINARY_DIR}) | ||
| 83 | string(REGEX REPLACE "([^;]+)" "--exclude=\"\\1\"" _gcovr_excludes "${COVERAGE_EXCLUDES}") | ||
| 84 | string(REPLACE "*" ".*" _gcovr_excludes "${_gcovr_excludes}") | ||
| 85 | add_custom_target(coverage_xml | ||
| 86 | COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target test || true | ||
| 87 | COMMAND ${GCOVR_EXECUTABLE} -x -r ${COVERAGE_SOURCE_DIR} -o ${COVERAGE_BINARY_DIR}/coverage.xml | ||
| 88 | --object-directory ${CMAKE_BINARY_DIR} ${_gcovr_excludes} ${CMAKE_BINARY_DIR} | ||
| 89 | COMMAND ${CMAKE_COMMAND} -E echo "Coverage report: file://${COVERAGE_BINARY_DIR}/coverage.xml" | ||
| 90 | WORKING_DIRECTORY ${COVERAGE_BINARY_DIR} | ||
| 91 | DEPENDS ${COVERAGE_DEPENDS} | ||
| 92 | COMMENT "Generate code coverage xml report" | ||
| 93 | ) | ||
| 94 | unset(_gcovr_excludes) | ||
| 95 | else() | ||
| 96 | message(WARNING "Target coverage_xml not available (gcovr needed).") | ||
| 97 | endif() | ||
diff --git a/project/cmake/scripts/linux/ExtraTargets.cmake b/project/cmake/scripts/linux/ExtraTargets.cmake deleted file mode 100644 index 2bb5f6f..0000000 --- a/project/cmake/scripts/linux/ExtraTargets.cmake +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | # xrandr | ||
| 2 | if(ENABLE_X11 AND X_FOUND AND XRANDR_FOUND) | ||
| 3 | find_package(X QUIET) | ||
| 4 | find_package(XRandR QUIET) | ||
| 5 | add_executable(${APP_NAME_LC}-xrandr ${CORE_SOURCE_DIR}/xbmc-xrandr.c) | ||
| 6 | target_link_libraries(${APP_NAME_LC}-xrandr ${SYSTEM_LDFLAGS} ${X_LIBRARIES} m ${XRANDR_LIBRARIES}) | ||
| 7 | endif() | ||
| 8 | |||
| 9 | # WiiRemote | ||
| 10 | if(ENABLE_EVENTCLIENTS) | ||
| 11 | add_subdirectory(${CORE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote) | ||
| 12 | endif() | ||
diff --git a/project/cmake/scripts/linux/Install.cmake b/project/cmake/scripts/linux/Install.cmake deleted file mode 100644 index 43e2e5e..0000000 --- a/project/cmake/scripts/linux/Install.cmake +++ /dev/null | |||
| @@ -1,367 +0,0 @@ | |||
| 1 | if(X_FOUND) | ||
| 2 | set(USE_X11 1) | ||
| 3 | else() | ||
| 4 | set(USE_X11 0) | ||
| 5 | endif() | ||
| 6 | if(OPENGL_FOUND) | ||
| 7 | set(USE_OPENGL 1) | ||
| 8 | else() | ||
| 9 | set(USE_OPENGL 0) | ||
| 10 | endif() | ||
| 11 | if(OPENGLES_FOUND) | ||
| 12 | set(USE_OPENGLES 1) | ||
| 13 | else() | ||
| 14 | set(USE_OPENGLES 0) | ||
| 15 | endif() | ||
| 16 | |||
| 17 | # CMake config | ||
| 18 | set(APP_PREFIX ${prefix}) | ||
| 19 | set(APP_LIB_DIR ${libdir}/${APP_NAME_LC}) | ||
| 20 | set(APP_DATA_DIR ${datarootdir}/${APP_NAME_LC}) | ||
| 21 | set(APP_INCLUDE_DIR ${includedir}/${APP_NAME_LC}) | ||
| 22 | set(CXX11_SWITCH "-std=c++11") | ||
| 23 | |||
| 24 | # Set XBMC_STANDALONE_SH_PULSE so we can insert PulseAudio block into kodi-standalone | ||
| 25 | if(EXISTS ${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse) | ||
| 26 | if(ENABLE_PULSEAUDIO AND PULSEAUDIO_FOUND) | ||
| 27 | file(READ "${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse" pulse_content) | ||
| 28 | set(XBMC_STANDALONE_SH_PULSE ${pulse_content}) | ||
| 29 | endif() | ||
| 30 | endif() | ||
| 31 | |||
| 32 | # Configure startup scripts | ||
| 33 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi.sh.in | ||
| 34 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} @ONLY) | ||
| 35 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in | ||
| 36 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone @ONLY) | ||
| 37 | |||
| 38 | # Configure cmake files | ||
| 39 | configure_file(${PROJECT_SOURCE_DIR}/KodiConfig.cmake.in | ||
| 40 | ${CORE_BUILD_DIR}/scripts/${APP_NAME}Config.cmake @ONLY) | ||
| 41 | |||
| 42 | # Configure xsession entry | ||
| 43 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-xsession.desktop.in | ||
| 44 | ${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop @ONLY) | ||
| 45 | |||
| 46 | # Install app | ||
| 47 | install(TARGETS ${APP_NAME_LC} | ||
| 48 | DESTINATION ${libdir}/${APP_NAME_LC} | ||
| 49 | COMPONENT kodi-bin) | ||
| 50 | if(ENABLE_X11 AND XRANDR_FOUND) | ||
| 51 | install(TARGETS ${APP_NAME_LC}-xrandr | ||
| 52 | DESTINATION ${libdir}/${APP_NAME_LC} | ||
| 53 | COMPONENT kodi-bin) | ||
| 54 | endif() | ||
| 55 | |||
| 56 | # Install scripts | ||
| 57 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} | ||
| 58 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone | ||
| 59 | DESTINATION ${bindir} | ||
| 60 | COMPONENT kodi-bin) | ||
| 61 | |||
| 62 | # Install libraries | ||
| 63 | foreach(library ${LIBRARY_FILES}) | ||
| 64 | get_filename_component(dir ${library} DIRECTORY) | ||
| 65 | string(REPLACE "${CMAKE_BINARY_DIR}/" "" dir ${dir}) | ||
| 66 | install(PROGRAMS ${library} | ||
| 67 | DESTINATION ${libdir}/${APP_NAME_LC}/${dir} | ||
| 68 | COMPONENT kodi-bin) | ||
| 69 | endforeach() | ||
| 70 | |||
| 71 | # Install add-ons, fonts, icons, keyboard maps, keymaps, etc | ||
| 72 | # (addons, media, system, userdata folders in share/kodi/) | ||
| 73 | foreach(file ${install_data}) | ||
| 74 | get_filename_component(dir ${file} DIRECTORY) | ||
| 75 | install(FILES ${CMAKE_BINARY_DIR}/${file} | ||
| 76 | DESTINATION ${datarootdir}/${APP_NAME_LC}/${dir} | ||
| 77 | COMPONENT kodi) | ||
| 78 | endforeach() | ||
| 79 | |||
| 80 | # Install xsession entry | ||
| 81 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop | ||
| 82 | DESTINATION ${datarootdir}/xsessions | ||
| 83 | COMPONENT kodi) | ||
| 84 | |||
| 85 | # Install desktop entry | ||
| 86 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/kodi.desktop | ||
| 87 | DESTINATION ${datarootdir}/applications | ||
| 88 | COMPONENT kodi) | ||
| 89 | |||
| 90 | # Install icons | ||
| 91 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon16x16.png | ||
| 92 | RENAME ${APP_NAME_LC}.png | ||
| 93 | DESTINATION ${datarootdir}/icons/hicolor/16x16/apps | ||
| 94 | COMPONENT kodi) | ||
| 95 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon22x22.png | ||
| 96 | RENAME ${APP_NAME_LC}.png | ||
| 97 | DESTINATION ${datarootdir}/icons/hicolor/22x22/apps | ||
| 98 | COMPONENT kodi) | ||
| 99 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon24x24.png | ||
| 100 | RENAME ${APP_NAME_LC}.png | ||
| 101 | DESTINATION ${datarootdir}/icons/hicolor/24x24/apps | ||
| 102 | COMPONENT kodi) | ||
| 103 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon32x32.png | ||
| 104 | RENAME ${APP_NAME_LC}.png | ||
| 105 | DESTINATION ${datarootdir}/icons/hicolor/32x32/apps | ||
| 106 | COMPONENT kodi) | ||
| 107 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon48x48.png | ||
| 108 | RENAME ${APP_NAME_LC}.png | ||
| 109 | DESTINATION ${datarootdir}/icons/hicolor/48x48/apps | ||
| 110 | COMPONENT kodi) | ||
| 111 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon64x64.png | ||
| 112 | RENAME ${APP_NAME_LC}.png | ||
| 113 | DESTINATION ${datarootdir}/icons/hicolor/64x64/apps | ||
| 114 | COMPONENT kodi) | ||
| 115 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon128x128.png | ||
| 116 | RENAME ${APP_NAME_LC}.png | ||
| 117 | DESTINATION ${datarootdir}/icons/hicolor/128x128/apps | ||
| 118 | COMPONENT kodi) | ||
| 119 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon256x256.png | ||
| 120 | RENAME ${APP_NAME_LC}.png | ||
| 121 | DESTINATION ${datarootdir}/icons/hicolor/256x256/apps | ||
| 122 | COMPONENT kodi) | ||
| 123 | install(CODE "execute_process(COMMAND gtk-update-icon-cache -f -q -t | ||
| 124 | $ENV{DESTDIR}${datarootdir}/icons/hicolor ERROR_QUIET)" | ||
| 125 | COMPONENT kodi) | ||
| 126 | |||
| 127 | # Install docs | ||
| 128 | install(FILES ${CORE_SOURCE_DIR}/copying.txt | ||
| 129 | ${CORE_SOURCE_DIR}/LICENSE.GPL | ||
| 130 | ${CORE_SOURCE_DIR}/version.txt | ||
| 131 | ${CORE_SOURCE_DIR}/docs/README.linux | ||
| 132 | DESTINATION ${datarootdir}/doc/${APP_NAME_LC} | ||
| 133 | COMPONENT kodi) | ||
| 134 | |||
| 135 | install(FILES ${CORE_SOURCE_DIR}/privacy-policy.txt | ||
| 136 | DESTINATION ${datarootdir}/${APP_NAME_LC} | ||
| 137 | COMPONENT kodi) | ||
| 138 | |||
| 139 | # Install kodi-tools-texturepacker | ||
| 140 | if(NOT WITH_TEXTUREPACKER) | ||
| 141 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/texturepacker/TexturePacker | ||
| 142 | DESTINATION ${bindir} | ||
| 143 | COMPONENT kodi-tools-texturepacker) | ||
| 144 | endif() | ||
| 145 | |||
| 146 | # Install kodi-addon-dev headers | ||
| 147 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h | ||
| 148 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_utils.hpp | ||
| 149 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_adsp.h | ||
| 150 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_audioengine.h | ||
| 151 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h | ||
| 152 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_inputstream.h | ||
| 153 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_peripheral.h | ||
| 154 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h | ||
| 155 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h | ||
| 156 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h | ||
| 157 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h | ||
| 158 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h | ||
| 159 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h | ||
| 160 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h | ||
| 161 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h | ||
| 162 | ${CORE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h | ||
| 163 | ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h | ||
| 164 | ${CORE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h | ||
| 165 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 166 | COMPONENT kodi-addon-dev) | ||
| 167 | |||
| 168 | # Install kodi-addon-dev add-on bindings | ||
| 169 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME}Config.cmake | ||
| 170 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddonHelpers.cmake | ||
| 171 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddOptions.cmake | ||
| 172 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/ArchSetup.cmake | ||
| 173 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/CheckCommits.cmake | ||
| 174 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/CheckTargetPlatform.cmake | ||
| 175 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/GenerateVersionedFiles.cmake | ||
| 176 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/GeneratorSetup.cmake | ||
| 177 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/HandleDepends.cmake | ||
| 178 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/Macros.cmake | ||
| 179 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/PrepareEnv.cmake | ||
| 180 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/ProjectMacros.cmake | ||
| 181 | ${CORE_SOURCE_DIR}/project/cmake/scripts/linux/PathSetup.cmake | ||
| 182 | DESTINATION ${datarootdir}/${APP_NAME_LC}/cmake | ||
| 183 | COMPONENT kodi-addon-dev) | ||
| 184 | |||
| 185 | # Install kodi-audio-dev | ||
| 186 | install(FILES ${CORE_SOURCE_DIR}/xbmc/cores/AudioEngine/Utils/AEChannelData.h | ||
| 187 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_dll.h | ||
| 188 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_types.h | ||
| 189 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audiodec_dll.h | ||
| 190 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audiodec_types.h | ||
| 191 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_audioenc_dll.h | ||
| 192 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_audioenc_types.h | ||
| 193 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audioengine_types.h | ||
| 194 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 195 | COMPONENT kodi-audio-dev) | ||
| 196 | |||
| 197 | if(ENABLE_EVENTCLIENTS) | ||
| 198 | # Install kodi-eventclients-common BT python files | ||
| 199 | install(PROGRAMS ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py | ||
| 200 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/bt.py | ||
| 201 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/hid.py | ||
| 202 | DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC}/bt | ||
| 203 | COMPONENT kodi-eventclients-common) | ||
| 204 | |||
| 205 | # Install kodi-eventclients-common PS3 python files | ||
| 206 | install(PROGRAMS ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/__init__.py | ||
| 207 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/keymaps.py | ||
| 208 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixaxis.py | ||
| 209 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixpair.py | ||
| 210 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixwatch.py | ||
| 211 | DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC}/ps3 | ||
| 212 | COMPONENT kodi-eventclients-common) | ||
| 213 | |||
| 214 | # Install kodi-eventclients-common python files | ||
| 215 | file(WRITE ${CMAKE_BINARY_DIR}/packages/deb/defs.py ICON_PATH="usr/share/pixmaps/${APP_NAME_LC}/") | ||
| 216 | install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/deb/defs.py | ||
| 217 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/__init__.py | ||
| 218 | "${CORE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" | ||
| 219 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/xbmcclient.py | ||
| 220 | ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/zeroconf.py | ||
| 221 | DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC} | ||
| 222 | COMPONENT kodi-eventclients-common) | ||
| 223 | |||
| 224 | # Install kodi-eventclients-common icons | ||
| 225 | install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/icons/bluetooth.png | ||
| 226 | ${CORE_SOURCE_DIR}/tools/EventClients/icons/phone.png | ||
| 227 | ${CORE_SOURCE_DIR}/tools/EventClients/icons/mail.png | ||
| 228 | ${CORE_SOURCE_DIR}/tools/EventClients/icons/mouse.png | ||
| 229 | DESTINATION ${datarootdir}/pixmaps/${APP_NAME_LC} | ||
| 230 | COMPONENT kodi-eventclients-common) | ||
| 231 | |||
| 232 | # Install kodi-eventclients-dev headers | ||
| 233 | install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/lib/c++/xbmcclient.h | ||
| 234 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 235 | COMPONENT kodi-eventclients-dev) | ||
| 236 | |||
| 237 | # Install kodi-eventclients-dev C# examples | ||
| 238 | install(FILES "${CORE_SOURCE_DIR}/tools/EventClients/examples/c#/XBMCDemoClient1.cs" | ||
| 239 | DESTINATION "${docdir}/${APP_NAME_LC}-eventclients-dev/examples/C#" | ||
| 240 | COMPONENT kodi-eventclients-dev) | ||
| 241 | |||
| 242 | # Install kodi-eventclients-dev C++ examples | ||
| 243 | install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_notification.cpp | ||
| 244 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_log.cpp | ||
| 245 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_button1.cpp | ||
| 246 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_mouse.cpp | ||
| 247 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_button2.cpp | ||
| 248 | DESTINATION ${docdir}/${APP_NAME_LC}-eventclients-dev/examples/C++ | ||
| 249 | COMPONENT kodi-eventclients-dev) | ||
| 250 | |||
| 251 | # Install kodi-eventclients-dev java examples | ||
| 252 | install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/examples/java/XBMCDemoClient1.java | ||
| 253 | DESTINATION ${docdir}/${APP_NAME_LC}-eventclients-dev/examples/java | ||
| 254 | COMPONENT kodi-eventclients-dev) | ||
| 255 | |||
| 256 | # Install kodi-eventclients-dev python examples | ||
| 257 | install(PROGRAMS ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_mouse.py | ||
| 258 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_button1.py | ||
| 259 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_notification.py | ||
| 260 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_action.py | ||
| 261 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_button2.py | ||
| 262 | ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_simple.py | ||
| 263 | DESTINATION ${docdir}/${APP_NAME_LC}-eventclients-dev/examples/python | ||
| 264 | COMPONENT kodi-eventclients-dev) | ||
| 265 | |||
| 266 | # Install kodi-eventclients-ps3 | ||
| 267 | install(PROGRAMS "${CORE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" | ||
| 268 | RENAME ${APP_NAME_LC}-ps3remote | ||
| 269 | DESTINATION ${bindir} | ||
| 270 | COMPONENT kodi-eventclients-ps3) | ||
| 271 | |||
| 272 | # Install kodi-eventclients-wiiremote | ||
| 273 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/WiiRemote/${APP_NAME_LC}-wiiremote | ||
| 274 | DESTINATION ${bindir} | ||
| 275 | COMPONENT kodi-eventclients-wiiremote) | ||
| 276 | |||
| 277 | # Install kodi-eventclients-xbmc-send | ||
| 278 | install(PROGRAMS "${CORE_SOURCE_DIR}/tools/EventClients/Clients/Kodi Send/kodi-send.py" | ||
| 279 | RENAME ${APP_NAME_LC}-send | ||
| 280 | DESTINATION ${bindir} | ||
| 281 | COMPONENT kodi-eventclients-xbmc-send) | ||
| 282 | endif() | ||
| 283 | |||
| 284 | # Install kodi-inputstream-dev | ||
| 285 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h | ||
| 286 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h | ||
| 287 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 288 | COMPONENT kodi-inputstream-dev) | ||
| 289 | |||
| 290 | # Install kodi-pvr-dev | ||
| 291 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h | ||
| 292 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h | ||
| 293 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h | ||
| 294 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 295 | COMPONENT kodi-pvr-dev) | ||
| 296 | |||
| 297 | # Install kodi-screensaver-dev | ||
| 298 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_dll.h | ||
| 299 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_types.h | ||
| 300 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 301 | COMPONENT kodi-screensaver-dev) | ||
| 302 | |||
| 303 | # Install kodi-visualization-dev | ||
| 304 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_vis_dll.h | ||
| 305 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_vis_types.h | ||
| 306 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 307 | COMPONENT kodi-visualization-dev) | ||
| 308 | |||
| 309 | # Install kodi-peripheral-dev | ||
| 310 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_callbacks.h | ||
| 311 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_dll.h | ||
| 312 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_types.h | ||
| 313 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_utils.hpp | ||
| 314 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 315 | COMPONENT kodi-peripheral-dev) | ||
| 316 | |||
| 317 | # Install kodi-game-dev | ||
| 318 | install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h | ||
| 319 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h | ||
| 320 | ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h | ||
| 321 | DESTINATION ${includedir}/${APP_NAME_LC} | ||
| 322 | COMPONENT kodi-game-dev) | ||
| 323 | |||
| 324 | |||
| 325 | # Install XBT skin files | ||
| 326 | foreach(texture ${XBT_FILES}) | ||
| 327 | string(REPLACE "${CMAKE_BINARY_DIR}/" "" dir ${texture}) | ||
| 328 | get_filename_component(dir ${dir} DIRECTORY) | ||
| 329 | install(FILES ${texture} | ||
| 330 | DESTINATION ${datarootdir}/${APP_NAME_LC}/${dir} | ||
| 331 | COMPONENT kodi) | ||
| 332 | endforeach() | ||
| 333 | |||
| 334 | # Install extra stuff if it exists | ||
| 335 | if(EXISTS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/extra-installs) | ||
| 336 | install(CODE "file(STRINGS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/extra-installs dirs) | ||
| 337 | foreach(dir \${dirs}) | ||
| 338 | file(GLOB_RECURSE FILES RELATIVE ${CMAKE_BINARY_DIR} \${dir}/*) | ||
| 339 | foreach(file \${FILES}) | ||
| 340 | get_filename_component(dir \${file} DIRECTORY) | ||
| 341 | file(INSTALL \${file} DESTINATION ${datarootdir}/${APP_NAME_LC}/\${dir}) | ||
| 342 | endforeach() | ||
| 343 | endforeach()") | ||
| 344 | endif() | ||
| 345 | |||
| 346 | if(NOT "$ENV{DESTDIR}" STREQUAL "") | ||
| 347 | set(DESTDIR ${CMAKE_BINARY_DIR}/$ENV{DESTDIR}) | ||
| 348 | endif() | ||
| 349 | foreach(subdir ${build_dirs}) | ||
| 350 | if(NOT subdir MATCHES kodi-platform) | ||
| 351 | string(REPLACE " " ";" subdir ${subdir}) | ||
| 352 | list(GET subdir 0 id) | ||
| 353 | install(CODE "execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${id}/src/${id}-build install DESTDIR=${DESTDIR})") | ||
| 354 | endif() | ||
| 355 | endforeach() | ||
| 356 | |||
| 357 | # generate packages? yes please, if everything checks out | ||
| 358 | if(CPACK_GENERATOR) | ||
| 359 | if(CPACK_GENERATOR STREQUAL DEB AND CORE_SYSTEM_NAME STREQUAL linux) | ||
| 360 | if(CMAKE_BUILD_TYPE STREQUAL Debug) | ||
| 361 | message(STATUS "DEB Generator: Build type is set to 'Debug'. Packaged binaries will be unstripped.") | ||
| 362 | endif() | ||
| 363 | include(${PROJECT_SOURCE_DIR}/cpack/CPackConfigDEB.cmake) | ||
| 364 | else() | ||
| 365 | message(FATAL_ERROR "DEB Generator: Can't configure CPack to generate Debian packages on non-linux systems.") | ||
| 366 | endif() | ||
| 367 | endif() | ||
diff --git a/project/cmake/scripts/linux/Macros.cmake b/project/cmake/scripts/linux/Macros.cmake deleted file mode 100644 index 72e9d5c..0000000 --- a/project/cmake/scripts/linux/Macros.cmake +++ /dev/null | |||
| @@ -1,95 +0,0 @@ | |||
| 1 | function(core_link_library lib wraplib) | ||
| 2 | set(export -Wl,--unresolved-symbols=ignore-all | ||
| 3 | `cat ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cores/dll-loader/exports/wrapper.def` | ||
| 4 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/cores/dll-loader/exports/CMakeFiles/wrapper.dir/wrapper.c.o) | ||
| 5 | set(check_arg "") | ||
| 6 | if(TARGET ${lib}) | ||
| 7 | set(target ${lib}) | ||
| 8 | set(link_lib $<TARGET_FILE:${lib}>) | ||
| 9 | set(check_arg ${ARGV2}) | ||
| 10 | set(data_arg ${ARGV3}) | ||
| 11 | else() | ||
| 12 | set(target ${ARGV2}) | ||
| 13 | set(link_lib ${lib}) | ||
| 14 | set(check_arg ${ARGV3}) | ||
| 15 | set(data_arg ${ARGV4}) | ||
| 16 | endif() | ||
| 17 | |||
| 18 | # wrapper has to be adapted in order to support coverage. | ||
| 19 | if(CMAKE_BUILD_TYPE STREQUAL Coverage) | ||
| 20 | set(export "") | ||
| 21 | endif() | ||
| 22 | |||
| 23 | if(check_arg STREQUAL export) | ||
| 24 | set(export ${export} | ||
| 25 | -Wl,--version-script=${ARGV3}) | ||
| 26 | elseif(check_arg STREQUAL extras) | ||
| 27 | foreach(arg ${data_arg}) | ||
| 28 | list(APPEND export ${arg}) | ||
| 29 | endforeach() | ||
| 30 | elseif(check_arg STREQUAL archives) | ||
| 31 | set(extra_libs ${data_arg}) | ||
| 32 | endif() | ||
| 33 | |||
| 34 | string(REGEX REPLACE "[ ]+" ";" _flags ${CMAKE_SHARED_LINKER_FLAGS}) | ||
| 35 | get_filename_component(dir ${wraplib} DIRECTORY) | ||
| 36 | add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX} | ||
| 37 | COMMAND ${CMAKE_COMMAND} -E make_directory ${dir} | ||
| 38 | COMMAND ${CMAKE_C_COMPILER} | ||
| 39 | ARGS ${_flags} -Wl,--whole-archive | ||
| 40 | "${link_lib}" ${extra_libs} | ||
| 41 | -Wl,--no-whole-archive -lm | ||
| 42 | -Wl,-soname,${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX} | ||
| 43 | -shared -o ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX} | ||
| 44 | ${export} | ||
| 45 | DEPENDS ${target} wrapper.def wrapper) | ||
| 46 | |||
| 47 | get_filename_component(libname ${wraplib} NAME_WE) | ||
| 48 | add_custom_target(wrap_${libname} ALL DEPENDS ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX}) | ||
| 49 | set_target_properties(wrap_${libname} PROPERTIES FOLDER lib/wrapped) | ||
| 50 | add_dependencies(${APP_NAME_LC}-libraries wrap_${libname}) | ||
| 51 | |||
| 52 | set(LIBRARY_FILES ${LIBRARY_FILES} ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX} CACHE STRING "" FORCE) | ||
| 53 | endfunction() | ||
| 54 | |||
| 55 | function(find_soname lib) | ||
| 56 | cmake_parse_arguments(arg "REQUIRED" "" "" ${ARGN}) | ||
| 57 | |||
| 58 | string(TOLOWER ${lib} liblow) | ||
| 59 | if(${lib}_LDFLAGS) | ||
| 60 | set(link_lib "${${lib}_LDFLAGS}") | ||
| 61 | else() | ||
| 62 | if(IS_ABSOLUTE "${${lib}_LIBRARIES}") | ||
| 63 | set(link_lib "${${lib}_LIBRARIES}") | ||
| 64 | else() | ||
| 65 | set(link_lib -l${${lib}_LIBRARIES}) | ||
| 66 | endif() | ||
| 67 | endif() | ||
| 68 | execute_process(COMMAND ${CMAKE_C_COMPILER} -nostdlib -o /dev/null -Wl,-M ${link_lib} | ||
| 69 | COMMAND grep LOAD.*${liblow} | ||
| 70 | ERROR_QUIET | ||
| 71 | OUTPUT_VARIABLE ${lib}_FILENAME) | ||
| 72 | string(REPLACE "LOAD " "" ${lib}_FILENAME "${${lib}_FILENAME}") | ||
| 73 | string(STRIP "${${lib}_FILENAME}" ${lib}_FILENAME) | ||
| 74 | if(NOT ${lib}_FILENAME) | ||
| 75 | execute_process(COMMAND ${CMAKE_C_COMPILER} -nostdlib -o /dev/null -Wl,-t ${link_lib} | ||
| 76 | OUTPUT_QUIET | ||
| 77 | ERROR_VARIABLE _TMP_FILENAME) | ||
| 78 | string(REGEX MATCH ".*lib${liblow}.so" ${lib}_FILENAME ${_TMP_FILENAME}) | ||
| 79 | endif() | ||
| 80 | if(${lib}_FILENAME) | ||
| 81 | execute_process(COMMAND objdump -p ${${lib}_FILENAME} | ||
| 82 | COMMAND grep SONAME.*${liblow} | ||
| 83 | ERROR_QUIET | ||
| 84 | OUTPUT_VARIABLE ${lib}_SONAME) | ||
| 85 | string(REPLACE "SONAME " "" ${lib}_SONAME ${${lib}_SONAME}) | ||
| 86 | string(STRIP ${${lib}_SONAME} ${lib}_SONAME) | ||
| 87 | if(VERBOSE) | ||
| 88 | message(STATUS "${lib} soname: ${${lib}_SONAME}") | ||
| 89 | endif() | ||
| 90 | set(${lib}_SONAME ${${lib}_SONAME} PARENT_SCOPE) | ||
| 91 | endif() | ||
| 92 | if(arg_REQUIRED AND NOT ${lib}_SONAME) | ||
| 93 | message(FATAL_ERROR "Could not find dynamically loadable library ${lib}") | ||
| 94 | endif() | ||
| 95 | endfunction() | ||
diff --git a/project/cmake/scripts/linux/PathSetup.cmake b/project/cmake/scripts/linux/PathSetup.cmake deleted file mode 100644 index f69711e..0000000 --- a/project/cmake/scripts/linux/PathSetup.cmake +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | include(GNUInstallDirs) | ||
| 2 | |||
| 3 | if(NOT prefix) | ||
| 4 | set(prefix ${CMAKE_INSTALL_PREFIX}) | ||
| 5 | else() | ||
| 6 | set(CMAKE_INSTALL_PREFIX ${prefix}) | ||
| 7 | endif() | ||
| 8 | if(NOT exec_prefix) | ||
| 9 | set(exec_prefix ${prefix}) | ||
| 10 | endif() | ||
| 11 | if(NOT libdir) | ||
| 12 | set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) | ||
| 13 | endif() | ||
| 14 | if(NOT bindir) | ||
| 15 | set(bindir ${CMAKE_INSTALL_FULL_BINDIR}) | ||
| 16 | endif() | ||
| 17 | if(NOT includedir) | ||
| 18 | set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) | ||
| 19 | endif() | ||
| 20 | if(NOT datarootdir) | ||
| 21 | set(datarootdir ${CMAKE_INSTALL_FULL_DATAROOTDIR}) | ||
| 22 | endif() | ||
| 23 | if(NOT datadir) | ||
| 24 | set(datadir ${CMAKE_INSTALL_FULL_DATADIR}) | ||
| 25 | endif() | ||
| 26 | if(NOT docdir) | ||
| 27 | set(docdir ${CMAKE_INSTALL_FULL_DOCDIR}) | ||
| 28 | endif() | ||
| 29 | |||
| 30 | list(APPEND final_message "-- PATH config --") | ||
| 31 | list(APPEND final_message "Prefix: ${prefix}") | ||
| 32 | list(APPEND final_message "Libdir: ${libdir}") | ||
| 33 | list(APPEND final_message "Bindir: ${bindir}") | ||
| 34 | list(APPEND final_message "Includedir: ${includedir}") | ||
| 35 | list(APPEND final_message "Datarootdir: ${datarootdir}") | ||
| 36 | list(APPEND final_message "Datadir: ${datadir}") | ||
| 37 | |||
| 38 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" | ||
| 39 | -DINSTALL_PATH=\"${datarootdir}/kodi\") | ||
