diff options
| author | manuel <manuel@mausz.at> | 2016-05-01 18:06:14 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2016-05-01 18:06:14 +0200 |
| commit | 5823b05feb29a59510c32a9c28ca18b50b9b6399 (patch) | |
| tree | ac1603a592af9415b722b2669e04e417bd13c45c /project/cmake/scripts | |
| parent | 88de33e1836c646ccf594ef162c258d1210fd24e (diff) | |
| download | kodi-pvr-build-5823b05feb29a59510c32a9c28ca18b50b9b6399.tar.gz kodi-pvr-build-5823b05feb29a59510c32a9c28ca18b50b9b6399.tar.bz2 kodi-pvr-build-5823b05feb29a59510c32a9c28ca18b50b9b6399.zip | |
sync with upstream
Diffstat (limited to 'project/cmake/scripts')
| -rw-r--r-- | project/cmake/scripts/common/generateversionedfiles.cmake | 2 | ||||
| -rw-r--r-- | project/cmake/scripts/common/macros.cmake | 98 | ||||
| -rw-r--r-- | project/cmake/scripts/common/prepare-env.cmake | 2 | ||||
| -rw-r--r-- | project/cmake/scripts/common/projectmacros.cmake | 11 | ||||
| -rw-r--r-- | project/cmake/scripts/darwin/pathsetup.cmake | 8 | ||||
| -rw-r--r-- | project/cmake/scripts/freebsd/archsetup.cmake | 2 | ||||
| -rw-r--r-- | project/cmake/scripts/freebsd/install.cmake | 4 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/archsetup.cmake | 2 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/install.cmake | 69 | ||||
| -rw-r--r-- | project/cmake/scripts/linux/pathsetup.cmake | 8 | ||||
| -rw-r--r-- | project/cmake/scripts/rbpi/archsetup.cmake | 2 | ||||
| -rw-r--r-- | project/cmake/scripts/windows/archsetup.cmake | 24 | ||||
| -rw-r--r-- | project/cmake/scripts/windows/c-flag-overrides.cmake | 4 | ||||
| -rw-r--r-- | project/cmake/scripts/windows/cxx-flag-overrides.cmake | 4 | ||||
| -rw-r--r-- | project/cmake/scripts/windows/macros.cmake | 6 | ||||
| -rw-r--r-- | project/cmake/scripts/windows/pathsetup.cmake | 8 |
16 files changed, 156 insertions, 98 deletions
diff --git a/project/cmake/scripts/common/generateversionedfiles.cmake b/project/cmake/scripts/common/generateversionedfiles.cmake index 9a4080a..ea1fad5 100644 --- a/project/cmake/scripts/common/generateversionedfiles.cmake +++ b/project/cmake/scripts/common/generateversionedfiles.cmake | |||
| @@ -9,5 +9,3 @@ configure_file(${CORE_SOURCE_DIR}/addons/kodi.guilib/addon.xml.in | |||
| 9 | ${CMAKE_BINARY_DIR}/addons/kodi.guilib/addon.xml @ONLY) | 9 | ${CMAKE_BINARY_DIR}/addons/kodi.guilib/addon.xml @ONLY) |
| 10 | configure_file(${CORE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in | 10 | configure_file(${CORE_SOURCE_DIR}/xbmc/CompileInfo.cpp.in |
| 11 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp @ONLY) | 11 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp @ONLY) |
| 12 | set(prefix ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}) | ||
| 13 | set(APP_LIBDIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/kodi) | ||
diff --git a/project/cmake/scripts/common/macros.cmake b/project/cmake/scripts/common/macros.cmake index dd2233b..0900740 100644 --- a/project/cmake/scripts/common/macros.cmake +++ b/project/cmake/scripts/common/macros.cmake | |||
| @@ -16,6 +16,12 @@ include(${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/macros.cmak | |||
| 16 | # Library will be built, optionally added to ${core_DEPENDS} | 16 | # Library will be built, optionally added to ${core_DEPENDS} |
| 17 | function(core_add_library name) | 17 | function(core_add_library name) |
| 18 | cmake_parse_arguments(arg "NO_MAIN_DEPENDS" "" "" ${ARGN}) | 18 | cmake_parse_arguments(arg "NO_MAIN_DEPENDS" "" "" ${ARGN}) |
| 19 | |||
| 20 | if(NOT SOURCES) | ||
| 21 | message(STATUS "No sources added to ${name} skipping") | ||
| 22 | return() | ||
| 23 | endif() | ||
| 24 | |||
| 19 | add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS}) | 25 | add_library(${name} STATIC ${SOURCES} ${HEADERS} ${OTHERS}) |
| 20 | set_target_properties(${name} PROPERTIES PREFIX "") | 26 | set_target_properties(${name} PROPERTIES PREFIX "") |
| 21 | if(NOT arg_NO_MAIN_DEPENDS) | 27 | if(NOT arg_NO_MAIN_DEPENDS) |
| @@ -53,48 +59,52 @@ endfunction() | |||
| 53 | # Arguments: | 59 | # Arguments: |
| 54 | # file full path to file to mirror | 60 | # file full path to file to mirror |
| 55 | # relative the relative base of file path in the build/install tree | 61 | # relative the relative base of file path in the build/install tree |
| 56 | # give another parameter to exclude from install target | 62 | # Optional Arguments: |
| 63 | # NO_INSTALL: exclude file from installation target | ||
| 57 | # Implicit arguments: | 64 | # Implicit arguments: |
| 58 | # CORE_SOURCE_DIR - root of source tree | 65 | # CORE_SOURCE_DIR - root of source tree |
| 59 | # On return: | 66 | # On return: |
| 60 | # file is added to ${install_data} and mirrored in build tree | 67 | # Files is mirrored to the build tree and added to ${install_data} |
| 68 | # (if NO_INSTALL is not given). | ||
| 61 | function(copy_file_to_buildtree file relative) | 69 | function(copy_file_to_buildtree file relative) |
| 62 | if(NOT WIN32) | 70 | cmake_parse_arguments(arg "NO_INSTALL" "" "" ${ARGN}) |
| 63 | string(REPLACE "\(" "\\(" file ${file}) | ||
| 64 | string(REPLACE "\)" "\\)" file ${file}) | ||
| 65 | endif() | ||
| 66 | string(REPLACE "${relative}/" "" outfile ${file}) | 71 | string(REPLACE "${relative}/" "" outfile ${file}) |
| 72 | get_filename_component(outdir ${outfile} DIRECTORY) | ||
| 67 | 73 | ||
| 68 | if(NOT TARGET export-files) | 74 | if(NOT TARGET export-files) |
| 69 | add_custom_target(export-files ALL COMMENT "Copying files into build tree") | 75 | file(REMOVE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake) |
| 76 | add_custom_target(export-files ALL COMMENT "Copying files into build tree" | ||
| 77 | COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake) | ||
| 70 | endif() | 78 | endif() |
| 71 | if(NOT ${CORE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR}) | 79 | if(NOT ${CORE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR}) |
| 72 | if(VERBOSE) | 80 | if(VERBOSE) |
| 73 | message(STATUS "copy_file_to_buildtree - copying file: ${file} -> ${CMAKE_CURRENT_BINARY_DIR}/${outfile}") | 81 | message(STATUS "copy_file_to_buildtree - copying file: ${file} -> ${CMAKE_BINARY_DIR}/${outfile}") |
| 74 | endif() | 82 | endif() |
| 75 | add_custom_command(TARGET export-files COMMAND ${CMAKE_COMMAND} -E copy_if_different "${file}" "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") | 83 | file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake |
| 84 | "file(COPY \"${file}\" DESTINATION \"${CMAKE_BINARY_DIR}/${outdir}\")\n") | ||
| 76 | endif() | 85 | endif() |
| 77 | if(NOT ARGN) | 86 | if(NOT arg_NO_INSTALL) |
| 78 | list(APPEND install_data ${outfile}) | 87 | list(APPEND install_data ${outfile}) |
| 79 | set(install_data ${install_data} PARENT_SCOPE) | 88 | set(install_data ${install_data} PARENT_SCOPE) |
| 80 | endif() | 89 | endif() |
| 81 | endfunction() | 90 | endfunction() |
| 82 | 91 | ||
| 83 | # add data files to installation list with a mirror in build tree. | 92 | # Add data files to installation list with a mirror in build tree. |
| 84 | # reads list of files to install from a given list of text files. | 93 | # reads list of files to install from a given list of text files. |
| 85 | # Arguments: | 94 | # Arguments: |
| 86 | # pattern globbing pattern for text files to read | 95 | # pattern globbing pattern for text files to read |
| 87 | # give another parameter to exclude from installation target | 96 | # Optional Arguments: |
| 97 | # NO_INSTALL: exclude files from installation target | ||
| 88 | # Implicit arguments: | 98 | # Implicit arguments: |
| 89 | # CORE_SOURCE_DIR - root of source tree | 99 | # CORE_SOURCE_DIR - root of source tree |
| 90 | # On return: | 100 | # On return: |
| 91 | # files are added to ${install_data} and mirrored in build tree | 101 | # Files are mirrored to the build tree and added to ${install_data} |
| 102 | # (if NO_INSTALL is not given). | ||
| 92 | function(copy_files_from_filelist_to_buildtree pattern) | 103 | function(copy_files_from_filelist_to_buildtree pattern) |
| 93 | foreach(arg ${ARGN}) | ||
| 94 | list(APPEND pattern ${arg}) | ||
| 95 | endforeach() | ||
| 96 | # copies files listed in text files to the buildtree | 104 | # copies files listed in text files to the buildtree |
| 97 | # Input: [glob pattern: filepattern] | 105 | # Input: [glob pattern: filepattern] |
| 106 | cmake_parse_arguments(arg "NO_INSTALL" "" "" ${ARGN}) | ||
| 107 | list(APPEND pattern ${ARGN}) | ||
| 98 | list(SORT pattern) | 108 | list(SORT pattern) |
| 99 | if(VERBOSE) | 109 | if(VERBOSE) |
| 100 | message(STATUS "copy_files_from_filelist_to_buildtree - got pattern: ${pattern}") | 110 | message(STATUS "copy_files_from_filelist_to_buildtree - got pattern: ${pattern}") |
| @@ -107,8 +117,8 @@ function(copy_files_from_filelist_to_buildtree pattern) | |||
| 107 | foreach(dir ${fstrings}) | 117 | foreach(dir ${fstrings}) |
| 108 | file(GLOB_RECURSE files RELATIVE ${CORE_SOURCE_DIR} ${CORE_SOURCE_DIR}/${dir}) | 118 | file(GLOB_RECURSE files RELATIVE ${CORE_SOURCE_DIR} ${CORE_SOURCE_DIR}/${dir}) |
| 109 | foreach(file ${files}) | 119 | foreach(file ${files}) |
| 110 | if(ARGN) | 120 | if(arg_NO_INSTALL) |
| 111 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR} 1) | 121 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR} NO_INSTALL) |
| 112 | else() | 122 | else() |
| 113 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR}) | 123 | copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} ${CORE_SOURCE_DIR}) |
| 114 | endif() | 124 | endif() |
| @@ -315,37 +325,37 @@ macro(today RESULT) | |||
| 315 | endmacro() | 325 | endmacro() |
| 316 | 326 | ||
| 317 | function(core_find_git_rev) | 327 | function(core_find_git_rev) |
| 318 | if(EXISTS ${CORE_SOURCE_DIR}/VERSION) | 328 | find_package(Git) |
| 319 | file(STRINGS ${CORE_SOURCE_DIR}/VERSION VERSION_FILE) | 329 | if(GIT_FOUND AND EXISTS ${CORE_SOURCE_DIR}/.git) |
| 320 | string(SUBSTRING "${VERSION_FILE}" 1 16 GIT_REV) | 330 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet -- |
| 321 | else() | 331 | RESULT_VARIABLE status_code |
| 322 | find_package(Git) | 332 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 323 | if(GIT_FOUND AND EXISTS ${CORE_SOURCE_DIR}/.git) | 333 | if (NOT status_code) |
| 324 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet -- | 334 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --ignore-submodules --quiet HEAD -- |
| 325 | RESULT_VARIABLE status_code | 335 | RESULT_VARIABLE status_code |
| 326 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | 336 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 327 | if (NOT status_code) | 337 | endif() |
| 328 | execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --cached --ignore-submodules --quiet HEAD -- | 338 | if (status_code) |
| 329 | RESULT_VARIABLE status_code | 339 | execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%h-dirty" HEAD |
| 340 | OUTPUT_VARIABLE HASH | ||
| 330 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | 341 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 342 | string(SUBSTRING ${HASH} 1 13 HASH) | ||
| 343 | else() | ||
| 344 | execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%h" HEAD | ||
| 345 | OUTPUT_VARIABLE HASH | ||
| 346 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | ||
| 347 | string(SUBSTRING ${HASH} 1 7 HASH) | ||
| 331 | endif() | 348 | endif() |
| 332 | today(DATE) | 349 | execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:"%cd" --date=short HEAD |
| 333 | execute_process(COMMAND ${GIT_EXECUTABLE} --no-pager log --abbrev=7 -n 1 | 350 | OUTPUT_VARIABLE DATE |
| 334 | --pretty=format:"%h-dirty" HEAD | 351 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) |
| 335 | OUTPUT_VARIABLE LOG_UNFORMATTED | 352 | string(SUBSTRING ${DATE} 1 10 DATE) |
| 336 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | 353 | else() |
| 337 | string(SUBSTRING ${LOG_UNFORMATTED} 1 7 HASH) | 354 | today(DATE) |
| 338 | else() | 355 | set(HASH "nogitfound") |
| 339 | execute_process(COMMAND ${GIT_EXECUTABLE} --no-pager log --abbrev=7 -n 1 | ||
| 340 | --pretty=format:"%h %cd" HEAD | ||
| 341 | OUTPUT_VARIABLE LOG_UNFORMATTED | ||
| 342 | WORKING_DIRECTORY ${CORE_SOURCE_DIR}) | ||
| 343 | string(SUBSTRING ${LOG_UNFORMATTED} 1 7 HASH) | ||
| 344 | string(SUBSTRING ${LOG_UNFORMATTED} 9 10 DATE) | ||
| 345 | string(REPLACE "-" "" DATE ${DATE}) | ||
| 346 | endif() | ||
| 347 | set(GIT_REV "${DATE}-${HASH}") | ||
| 348 | endif() | 356 | endif() |
| 357 | string(REPLACE "-" "" DATE ${DATE}) | ||
| 358 | set(GIT_REV "${DATE}-${HASH}") | ||
| 349 | if(GIT_REV) | 359 | if(GIT_REV) |
| 350 | set(APP_SCMID ${GIT_REV} PARENT_SCOPE) | 360 | set(APP_SCMID ${GIT_REV} PARENT_SCOPE) |
| 351 | endif() | 361 | endif() |
diff --git a/project/cmake/scripts/common/prepare-env.cmake b/project/cmake/scripts/common/prepare-env.cmake index b9a39e7..8e9bd1c 100644 --- a/project/cmake/scripts/common/prepare-env.cmake +++ b/project/cmake/scripts/common/prepare-env.cmake | |||
| @@ -100,7 +100,7 @@ if(WIN32) | |||
| 100 | if(PATCH_FOUND) | 100 | if(PATCH_FOUND) |
| 101 | message(STATUS "patch utility found at ${PATCH_FOUND}") | 101 | message(STATUS "patch utility found at ${PATCH_FOUND}") |
| 102 | else() | 102 | else() |
| 103 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-1") | 103 | set(PATCH_ARCHIVE_NAME "patch-2.5.9-7-bin-3") |
| 104 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") | 104 | set(PATCH_ARCHIVE "${PATCH_ARCHIVE_NAME}.zip") |
| 105 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") | 105 | set(PATCH_URL "${KODI_MIRROR}/build-deps/win32/${PATCH_ARCHIVE}") |
| 106 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) | 106 | set(PATCH_DOWNLOAD ${BUILD_DIR}/download/${PATCH_ARCHIVE}) |
diff --git a/project/cmake/scripts/common/projectmacros.cmake b/project/cmake/scripts/common/projectmacros.cmake index d0739c4..7ce4ee9 100644 --- a/project/cmake/scripts/common/projectmacros.cmake +++ b/project/cmake/scripts/common/projectmacros.cmake | |||
| @@ -35,10 +35,13 @@ function(copy_skin_to_buildtree skin relative) | |||
| 35 | endforeach() | 35 | endforeach() |
| 36 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${dest}/media) | 36 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${dest}/media) |
| 37 | string(REPLACE "${relative}/" "" dest ${skin}) | 37 | string(REPLACE "${relative}/" "" dest ${skin}) |
| 38 | pack_xbt(${skin}/media | 38 | pack_xbt(${skin}/media ${CMAKE_BINARY_DIR}/${dest}/media/Textures.xbt) |
| 39 | ${CMAKE_BINARY_DIR}/${dest}/media/Textures.xbt | 39 | |
| 40 | ${CMAKE_BINARY_DIR}) | 40 | file(GLOB THEMES RELATIVE ${skin}/themes ${skin}/themes/*) |
| 41 | 41 | foreach(theme ${THEMES}) | |
| 42 | pack_xbt(${skin}/themes/${theme} ${CMAKE_BINARY_DIR}/${dest}/media/${theme}.xbt) | ||
| 43 | endforeach() | ||
| 44 | |||
| 42 | set(XBT_FILES ${XBT_FILES} PARENT_SCOPE) | 45 | set(XBT_FILES ${XBT_FILES} PARENT_SCOPE) |
| 43 | set(install_data ${install_data} PARENT_SCOPE) | 46 | set(install_data ${install_data} PARENT_SCOPE) |
| 44 | endfunction() | 47 | endfunction() |
diff --git a/project/cmake/scripts/darwin/pathsetup.cmake b/project/cmake/scripts/darwin/pathsetup.cmake index e31f66e..071dfd4 100644 --- a/project/cmake/scripts/darwin/pathsetup.cmake +++ b/project/cmake/scripts/darwin/pathsetup.cmake | |||
| @@ -2,7 +2,7 @@ if(NOT prefix) | |||
| 2 | set(prefix ${DEPENDS_PATH}) | 2 | set(prefix ${DEPENDS_PATH}) |
| 3 | endif() | 3 | endif() |
| 4 | if(NOT exec_prefix) | 4 | if(NOT exec_prefix) |
| 5 | set(exec_prefix \${prefix}) | 5 | set(exec_prefix ${prefix}) |
| 6 | endif() | 6 | endif() |
| 7 | if(NOT libdir) | 7 | if(NOT libdir) |
| 8 | set(libdir ${prefix}/lib) | 8 | set(libdir ${prefix}/lib) |
| @@ -17,7 +17,7 @@ if(NOT datarootdir) | |||
| 17 | set(datarootdir ${prefix}/share) | 17 | set(datarootdir ${prefix}/share) |
| 18 | endif() | 18 | endif() |
| 19 | if(NOT datadir) | 19 | if(NOT datadir) |
| 20 | set(datadir \${datarootdir}) | 20 | set(datadir ${datarootdir}) |
| 21 | endif() | 21 | endif() |
| 22 | 22 | ||
| 23 | list(APPEND final_message "-- PATH config --") | 23 | list(APPEND final_message "-- PATH config --") |
| @@ -28,5 +28,5 @@ list(APPEND final_message "Includedir: ${includedir}") | |||
| 28 | list(APPEND final_message "Datarootdir: ${datarootdir}") | 28 | list(APPEND final_message "Datarootdir: ${datarootdir}") |
| 29 | list(APPEND final_message "Datadir: ${datadir}") | 29 | list(APPEND final_message "Datadir: ${datadir}") |
| 30 | 30 | ||
| 31 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/xbmc\" | 31 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" |
| 32 | -DINSTALL_PATH=\"${datarootdir}/xbmc\") | 32 | -DINSTALL_PATH=\"${datarootdir}/kodi\") |
diff --git a/project/cmake/scripts/freebsd/archsetup.cmake b/project/cmake/scripts/freebsd/archsetup.cmake index edc77f1..b85121f 100644 --- a/project/cmake/scripts/freebsd/archsetup.cmake +++ b/project/cmake/scripts/freebsd/archsetup.cmake | |||
| @@ -15,5 +15,5 @@ else() | |||
| 15 | endif() | 15 | endif() |
| 16 | endif() | 16 | endif() |
| 17 | 17 | ||
| 18 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") | 18 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") |
| 19 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) | 19 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) |
diff --git a/project/cmake/scripts/freebsd/install.cmake b/project/cmake/scripts/freebsd/install.cmake index 0c8939e..8247416 100644 --- a/project/cmake/scripts/freebsd/install.cmake +++ b/project/cmake/scripts/freebsd/install.cmake | |||
| @@ -20,7 +20,9 @@ install(FILES ${CORE_SOURCE_DIR}/tools/Linux/xbmc-xsession.desktop | |||
| 20 | RENAME XBMC.desktop | 20 | RENAME XBMC.desktop |
| 21 | DESTINATION share/xsessions) | 21 | DESTINATION share/xsessions) |
| 22 | 22 | ||
| 23 | install(FILES ${CORE_SOURCE_DIR}/LICENSE.GPL | 23 | install(FILES ${CORE_SOURCE_DIR}/copying.txt |
| 24 | ${CORE_SOURCE_DIR}/LICENSE.GPL | ||
| 25 | ${CORE_SOURCE_DIR}/version.txt | ||
| 24 | ${CORE_SOURCE_DIR}/docs/README.freebsd | 26 | ${CORE_SOURCE_DIR}/docs/README.freebsd |
| 25 | DESTINATION share/doc/xbmc) | 27 | DESTINATION share/doc/xbmc) |
| 26 | 28 | ||
diff --git a/project/cmake/scripts/linux/archsetup.cmake b/project/cmake/scripts/linux/archsetup.cmake index d0e149e..e193768 100644 --- a/project/cmake/scripts/linux/archsetup.cmake +++ b/project/cmake/scripts/linux/archsetup.cmake | |||
| @@ -17,5 +17,5 @@ endif() | |||
| 17 | 17 | ||
| 18 | find_package(CXX11 REQUIRED) | 18 | find_package(CXX11 REQUIRED) |
| 19 | 19 | ||
| 20 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") | 20 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") |
| 21 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) | 21 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) |
diff --git a/project/cmake/scripts/linux/install.cmake b/project/cmake/scripts/linux/install.cmake index b887610..962a816 100644 --- a/project/cmake/scripts/linux/install.cmake +++ b/project/cmake/scripts/linux/install.cmake | |||
| @@ -14,28 +14,63 @@ else() | |||
| 14 | set(USE_OPENGLES 0) | 14 | set(USE_OPENGLES 0) |
| 15 | endif() | 15 | endif() |
| 16 | 16 | ||
| 17 | configure_file(${CORE_SOURCE_DIR}/project/cmake/${APP_NAME_LC}-config.cmake.in | ||
| 18 | ${CORE_BUILD_DIR}/${APP_NAME_LC}-config.cmake @ONLY) | ||
| 19 | |||
| 17 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi.sh.in | 20 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi.sh.in |
| 18 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} @ONLY) | 21 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} @ONLY) |
| 22 | |||
| 23 | # Set XBMC_STANDALONE_SH_PULSE so we can insert PulseAudio block into kodi-standalone | ||
| 24 | if(EXISTS ${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse) | ||
| 25 | if(ENABLE_PULSEAUDIO AND PULSEAUDIO_FOUND) | ||
| 26 | file(READ "${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse" pulse_content) | ||
| 27 | set(XBMC_STANDALONE_SH_PULSE ${pulse_content}) | ||
| 28 | endif() | ||
| 29 | endif() | ||
| 30 | |||
| 19 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in | 31 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in |
| 20 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone @ONLY) | 32 | ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone @ONLY) |
| 21 | 33 | ||
| 22 | install(TARGETS ${APP_NAME_LC} DESTINATION ${libdir}/kodi) | 34 | install(TARGETS ${APP_NAME_LC} DESTINATION ${libdir}/kodi) |
| 23 | if(ENABLE_X11 AND XRANDR_FOUND) | 35 | if(ENABLE_X11 AND XRANDR_FOUND) |
| 24 | install(TARGETS ${APP_NAME_LC}-xrandr DESTINATION ${libdir}/${APP_NAME_LC}) | 36 | install(TARGETS ${APP_NAME_LC}-xrandr DESTINATION ${libdir}/${APP_NAME_LC}) |
| 25 | endif() | 37 | endif() |
| 38 | |||
| 39 | if(NOT EXISTS ${libdir}/xbmc) | ||
| 40 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}/ xbmc WORKING_DIRECTORY ${libdir})") | ||
| 41 | endif() | ||
| 26 | install(FILES ${addon_bindings} DESTINATION ${includedir}/kodi) | 42 | install(FILES ${addon_bindings} DESTINATION ${includedir}/kodi) |
| 27 | install(FILES ${cmake-files} | 43 | if(NOT EXISTS ${includedir}/xbmc) |
| 44 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}/ xbmc WORKING_DIRECTORY ${includedir})") | ||
| 45 | endif() | ||
| 46 | |||
| 47 | install(FILES ${cmake_files} | ||
| 28 | DESTINATION ${libdir}/kodi) | 48 | DESTINATION ${libdir}/kodi) |
| 49 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}-config.cmake | ||
| 50 | DESTINATION ${libdir}/${APP_NAME_LC}) | ||
| 51 | install(FILES ${CORE_SOURCE_DIR}/project/cmake/xbmc-config.cmake.in | ||
| 52 | RENAME xbmc-config.cmake | ||
| 53 | DESTINATION ${libdir}/${APP_NAME_LC}) | ||
| 54 | |||
| 29 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} | 55 | install(PROGRAMS ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} |
| 30 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone | 56 | ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone |
| 31 | DESTINATION ${bindir}) | 57 | DESTINATION ${bindir}) |
| 58 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC} xbmc WORKING_DIRECTORY ${bindir})") | ||
| 59 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}-standalone xbmc-standalone WORKING_DIRECTORY ${bindir})") | ||
| 32 | 60 | ||
| 33 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-xsession.desktop.in | 61 | configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-xsession.desktop.in |
| 34 | ${CORE_BUILD_DIR}/${APP_NAME_LC}-xsession.desktop) | 62 | ${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop) |
| 35 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}-xsession.desktop | 63 | install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop |
| 36 | DESTINATION ${datarootdir}/xsessions) | 64 | DESTINATION ${datarootdir}/xsessions) |
| 65 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}.desktop xbmc.desktop WORKING_DIRECTORY ${datarootdir}/xsessions/)") | ||
| 66 | |||
| 67 | if(NOT EXISTS ${datarootdir}/xbmc) | ||
| 68 | install(CODE "execute_process (COMMAND ln -sf ${APP_NAME_LC}/ xbmc WORKING_DIRECTORY ${datarootdir})") | ||
| 69 | endif() | ||
| 37 | 70 | ||
| 38 | install(FILES ${CORE_SOURCE_DIR}/LICENSE.GPL | 71 | install(FILES ${CORE_SOURCE_DIR}/copying.txt |
| 72 | ${CORE_SOURCE_DIR}/LICENSE.GPL | ||
| 73 | ${CORE_SOURCE_DIR}/version.txt | ||
| 39 | ${CORE_SOURCE_DIR}/docs/README.linux | 74 | ${CORE_SOURCE_DIR}/docs/README.linux |
| 40 | DESTINATION ${datarootdir}/doc/kodi) | 75 | DESTINATION ${datarootdir}/doc/kodi) |
| 41 | 76 | ||
| @@ -83,10 +118,28 @@ foreach(subdir ${build_dirs}) | |||
| 83 | endif() | 118 | endif() |
| 84 | endforeach() | 119 | endforeach() |
| 85 | 120 | ||
| 86 | install(FILES ${CORE_SOURCE_DIR}/media/icon48x48.png | 121 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon16x16.png |
| 122 | RENAME ${APP_NAME_LC}.png | ||
| 123 | DESTINATION ${datarootdir}/icons/hicolor/16x16/apps) | ||
| 124 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon22x22.png | ||
| 125 | RENAME ${APP_NAME_LC}.png | ||
| 126 | DESTINATION ${datarootdir}/icons/hicolor/22x22/apps) | ||
| 127 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon24x24.png | ||
| 128 | RENAME ${APP_NAME_LC}.png | ||
| 129 | DESTINATION ${datarootdir}/icons/hicolor/24x24/apps) | ||
| 130 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon32x32.png | ||
| 131 | RENAME ${APP_NAME_LC}.png | ||
| 132 | DESTINATION ${datarootdir}/icons/hicolor/32x32/apps) | ||
| 133 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon48x48.png | ||
| 87 | RENAME ${APP_NAME_LC}.png | 134 | RENAME ${APP_NAME_LC}.png |
| 88 | DESTINATION ${datarootdir}/icons/hicolor/48x48/apps) | 135 | DESTINATION ${datarootdir}/icons/hicolor/48x48/apps) |
| 89 | install(FILES ${CORE_SOURCE_DIR}/media/icon256x256.png | 136 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon64x64.png |
| 137 | RENAME ${APP_NAME_LC}.png | ||
| 138 | DESTINATION ${datarootdir}/icons/hicolor/64x64/apps) | ||
| 139 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon128x128.png | ||
| 140 | RENAME ${APP_NAME_LC}.png | ||
| 141 | DESTINATION ${datarootdir}/icons/hicolor/128x128/apps) | ||
| 142 | install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon256x256.png | ||
| 90 | RENAME ${APP_NAME_LC}.png | 143 | RENAME ${APP_NAME_LC}.png |
| 91 | DESTINATION ${datarootdir}/icons/hicolor/256x256/apps) | 144 | DESTINATION ${datarootdir}/icons/hicolor/256x256/apps) |
| 92 | 145 | ||
diff --git a/project/cmake/scripts/linux/pathsetup.cmake b/project/cmake/scripts/linux/pathsetup.cmake index 940fb62..8550616 100644 --- a/project/cmake/scripts/linux/pathsetup.cmake +++ b/project/cmake/scripts/linux/pathsetup.cmake | |||
| @@ -4,7 +4,7 @@ else() | |||
| 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) | 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) |
| 5 | endif() | 5 | endif() |
| 6 | if(NOT exec_prefix) | 6 | if(NOT exec_prefix) |
| 7 | set(exec_prefix \${prefix}) | 7 | set(exec_prefix ${prefix}) |
| 8 | endif() | 8 | endif() |
| 9 | if(NOT libdir) | 9 | if(NOT libdir) |
| 10 | set(libdir ${prefix}/lib) | 10 | set(libdir ${prefix}/lib) |
| @@ -19,7 +19,7 @@ if(NOT datarootdir) | |||
| 19 | set(datarootdir ${prefix}/share) | 19 | set(datarootdir ${prefix}/share) |
| 20 | endif() | 20 | endif() |
| 21 | if(NOT datadir) | 21 | if(NOT datadir) |
| 22 | set(datadir \${datarootdir}) | 22 | set(datadir ${datarootdir}) |
| 23 | endif() | 23 | endif() |
| 24 | 24 | ||
| 25 | list(APPEND final_message "-- PATH config --") | 25 | list(APPEND final_message "-- PATH config --") |
| @@ -30,5 +30,5 @@ list(APPEND final_message "Includedir: ${includedir}") | |||
| 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") | 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") |
| 31 | list(APPEND final_message "Datadir: ${datadir}") | 31 | list(APPEND final_message "Datadir: ${datadir}") |
| 32 | 32 | ||
| 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/xbmc\" | 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" |
| 34 | -DINSTALL_PATH=\"${datarootdir}/xbmc\") | 34 | -DINSTALL_PATH=\"${datarootdir}/kodi\") |
diff --git a/project/cmake/scripts/rbpi/archsetup.cmake b/project/cmake/scripts/rbpi/archsetup.cmake index 84f1dad..72a610f 100644 --- a/project/cmake/scripts/rbpi/archsetup.cmake +++ b/project/cmake/scripts/rbpi/archsetup.cmake | |||
| @@ -25,7 +25,7 @@ endif() | |||
| 25 | 25 | ||
| 26 | find_package(CXX11 REQUIRED) | 26 | find_package(CXX11 REQUIRED) |
| 27 | 27 | ||
| 28 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") | 28 | set(LIRC_DEVICE "\"/dev/lircd\"" CACHE STRING "LIRC device to use") |
| 29 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) | 29 | set(DEP_DEFINES -DLIRC_DEVICE=${LIRC_DEVICE}) |
| 30 | set(MMAL_FOUND 1 CACHE INTERNAL "MMAL") | 30 | set(MMAL_FOUND 1 CACHE INTERNAL "MMAL") |
| 31 | set(OMX_FOUND 1 CACHE INTERNAL "OMX") | 31 | set(OMX_FOUND 1 CACHE INTERNAL "OMX") |
diff --git a/project/cmake/scripts/windows/archsetup.cmake b/project/cmake/scripts/windows/archsetup.cmake index baa3624..a54ab65 100644 --- a/project/cmake/scripts/windows/archsetup.cmake +++ b/project/cmake/scripts/windows/archsetup.cmake | |||
| @@ -15,9 +15,6 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32) | |||
| 15 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg) | 15 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg) |
| 16 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin) | 16 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin) |
| 17 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../BuildDependencies) | 17 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../BuildDependencies) |
| 18 | set(CONFIGURATION_LIBDIR lib/${CORE_BUILD_CONFIG}-vc120) | ||
| 19 | set(CONFIGURATION_LIBDIR_RELEASE lib/Release-vc120) | ||
| 20 | set(CONFIGURATION_LIBDIR_DEBUG lib/Debug-vc120) | ||
| 21 | 18 | ||
| 22 | set(JPEG_NAMES ${JPEG_NAMES} jpeg-static) | 19 | set(JPEG_NAMES ${JPEG_NAMES} jpeg-static) |
| 23 | set(PYTHON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../BuildDependencies/include/python) | 20 | set(PYTHON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../BuildDependencies/include/python) |
| @@ -32,13 +29,7 @@ set(SYSTEM_DEFINES -DNOMINMAX -D_USE_32BIT_TIME_T -DHAS_DX -D__STDC_CONSTANT_MAC | |||
| 32 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" | 29 | -DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 33 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" | 30 | -DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi" |
| 34 | -DBUILDING_WITH_CMAKE | 31 | -DBUILDING_WITH_CMAKE |
| 35 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO -D_SECURE_SCL=0 -D_HAS_ITERATOR_DEBUGGING=0>) | 32 | $<$<CONFIG:Debug>:-DD3D_DEBUG_INFO -D_ITERATOR_DEBUG_LEVEL=0>) |
| 36 | |||
| 37 | # Compile with /MT (to be compatible with the dependent libraries) | ||
| 38 | foreach(CompilerFlag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE | ||
| 39 | CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) | ||
| 40 | string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") | ||
| 41 | endforeach() | ||
| 42 | 33 | ||
| 43 | # Make sure /FS is set for Visual Studio in order to prevent simultanious access to pdb files. | 34 | # Make sure /FS is set for Visual Studio in order to prevent simultanious access to pdb files. |
| 44 | if(CMAKE_GENERATOR MATCHES "Visual Studio") | 35 | if(CMAKE_GENERATOR MATCHES "Visual Studio") |
| @@ -53,16 +44,15 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") | |||
| 53 | # For #pragma comment(lib X) | 44 | # For #pragma comment(lib X) |
| 54 | # TODO: It would certainly be better to handle these libraries via CMake modules. | 45 | # TODO: It would certainly be better to handle these libraries via CMake modules. |
| 55 | link_directories(${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin | 46 | link_directories(${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin |
| 56 | ${PROJECT_SOURCE_DIR}/../BuildDependencies/lib | 47 | ${PROJECT_SOURCE_DIR}/../BuildDependencies/lib) |
| 57 | ${PROJECT_SOURCE_DIR}/../BuildDependencies/${CONFIGURATION_LIBDIR}) | ||
| 58 | 48 | ||
| 59 | # Additional libraries | 49 | # Additional libraries |
| 60 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib | 50 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib |
| 61 | PowrProf.lib setupapi.lib dwmapi.lib yajl.lib dxguid.lib DelayImp.lib) | 51 | PowrProf.lib setupapi.lib dwmapi.lib yajl.lib dxguid.lib DelayImp.lib) |
| 62 | 52 | ||
| 63 | # NODEFAULTLIB option | 53 | # NODEFAULTLIB option |
| 64 | set(_nodefaultlibs_RELEASE libc msvcrt libci msvcprt) | 54 | set(_nodefaultlibs_RELEASE libcmt) |
| 65 | set(_nodefaultlibs_DEBUG libcpmt libc msvcrt libcmt msvcrtd msvcprtd) | 55 | set(_nodefaultlibs_DEBUG libcmt msvcrt) |
| 66 | foreach(_lib ${_nodefaultlibs_RELEASE}) | 56 | foreach(_lib ${_nodefaultlibs_RELEASE}) |
| 67 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:\"${_lib}\"") | 57 | set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:\"${_lib}\"") |
| 68 | endforeach() | 58 | endforeach() |
| @@ -71,9 +61,9 @@ foreach(_lib ${_nodefaultlibs_DEBUG}) | |||
| 71 | endforeach() | 61 | endforeach() |
| 72 | 62 | ||
| 73 | # DELAYLOAD option | 63 | # DELAYLOAD option |
| 74 | set(_delayloadlibs libxslt.dll dnssd.dll dwmapi.dll ssh.dll sqlite3.dll | 64 | set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll ssh.dll sqlite3.dll |
| 75 | avcodec-56.dll avfilter-5.dll avformat-56.dll avutil-54.dll | 65 | avcodec-57.dll avfilter-6.dll avformat-57.dll avutil-55.dll |
| 76 | postproc-53.dll swresample-1.dll swscale-3.dll d3dcompiler_47.dll) | 66 | postproc-54.dll swresample-2.dll swscale-4.dll d3dcompiler_47.dll) |
| 77 | foreach(_lib ${_delayloadlibs}) | 67 | foreach(_lib ${_delayloadlibs}) |
| 78 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") | 68 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"") |
| 79 | endforeach() | 69 | endforeach() |
diff --git a/project/cmake/scripts/windows/c-flag-overrides.cmake b/project/cmake/scripts/windows/c-flag-overrides.cmake index 63825a4..fd85f5c 100644 --- a/project/cmake/scripts/windows/c-flag-overrides.cmake +++ b/project/cmake/scripts/windows/c-flag-overrides.cmake | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | if(MSVC) | 1 | if(MSVC) |
| 2 | set(CMAKE_C_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /Zi /arch:SSE2") | 2 | set(CMAKE_C_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /Zi /arch:SSE2") |
| 3 | set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_HAS_ITERATOR_DEBUGGING=0 /D_SECURE_SCL=0") | 3 | set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_ITERATOR_DEBUG_LEVEL=0") |
| 4 | set(CMAKE_C_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") | 4 | set(CMAKE_C_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") |
| 5 | endif(MSVC) \ No newline at end of file | 5 | endif(MSVC) |
diff --git a/project/cmake/scripts/windows/cxx-flag-overrides.cmake b/project/cmake/scripts/windows/cxx-flag-overrides.cmake index 366def3..536b809 100644 --- a/project/cmake/scripts/windows/cxx-flag-overrides.cmake +++ b/project/cmake/scripts/windows/cxx-flag-overrides.cmake | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | if(MSVC) | 1 | if(MSVC) |
| 2 | set(CMAKE_CXX_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /GR /Zi /EHsc /arch:SSE2") | 2 | set(CMAKE_CXX_FLAGS_INIT "/MP /DWIN32 /D_WINDOWS /W3 /GR /Zi /EHsc /arch:SSE2") |
| 3 | set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_HAS_ITERATOR_DEBUGGING=0 /D_SECURE_SCL=0") | 3 | set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Ob0 /Od /RTC1 /D_ITERATOR_DEBUG_LEVEL=0") |
| 4 | set(CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") | 4 | set(CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /Ox /Ob2 /Oi /Ot /Oy /GL /DNDEBUG") |
| 5 | endif(MSVC) \ No newline at end of file | 5 | endif(MSVC) |
diff --git a/project/cmake/scripts/windows/macros.cmake b/project/cmake/scripts/windows/macros.cmake index 6aabf7d..2b61875 100644 --- a/project/cmake/scripts/windows/macros.cmake +++ b/project/cmake/scripts/windows/macros.cmake | |||
| @@ -87,11 +87,13 @@ function(add_precompiled_header target pch_header pch_source) | |||
| 87 | # As own target for usage in multiple libraries | 87 | # As own target for usage in multiple libraries |
| 88 | if(NOT TARGET ${PCH_PCH_TARGET}_pch) | 88 | if(NOT TARGET ${PCH_PCH_TARGET}_pch) |
| 89 | add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) | 89 | add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) |
| 90 | set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | 90 | set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_NAME vc140 |
| 91 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | ||
| 91 | endif() | 92 | endif() |
| 92 | # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). | 93 | # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). |
| 93 | target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) | 94 | target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) |
| 94 | set_target_properties(${target} PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | 95 | set_target_properties(${target} PROPERTIES COMPILE_PDB_NAME vc140 |
| 96 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | ||
| 95 | else() | 97 | else() |
| 96 | # As part of the target | 98 | # As part of the target |
| 97 | target_sources(${target} PRIVATE ${pch_source}) | 99 | target_sources(${target} PRIVATE ${pch_source}) |
diff --git a/project/cmake/scripts/windows/pathsetup.cmake b/project/cmake/scripts/windows/pathsetup.cmake index 940fb62..8550616 100644 --- a/project/cmake/scripts/windows/pathsetup.cmake +++ b/project/cmake/scripts/windows/pathsetup.cmake | |||
| @@ -4,7 +4,7 @@ else() | |||
| 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) | 4 | set(CMAKE_INSTALL_PREFIX ${prefix}) |
| 5 | endif() | 5 | endif() |
| 6 | if(NOT exec_prefix) | 6 | if(NOT exec_prefix) |
| 7 | set(exec_prefix \${prefix}) | 7 | set(exec_prefix ${prefix}) |
| 8 | endif() | 8 | endif() |
| 9 | if(NOT libdir) | 9 | if(NOT libdir) |
| 10 | set(libdir ${prefix}/lib) | 10 | set(libdir ${prefix}/lib) |
| @@ -19,7 +19,7 @@ if(NOT datarootdir) | |||
| 19 | set(datarootdir ${prefix}/share) | 19 | set(datarootdir ${prefix}/share) |
| 20 | endif() | 20 | endif() |
| 21 | if(NOT datadir) | 21 | if(NOT datadir) |
| 22 | set(datadir \${datarootdir}) | 22 | set(datadir ${datarootdir}) |
| 23 | endif() | 23 | endif() |
| 24 | 24 | ||
| 25 | list(APPEND final_message "-- PATH config --") | 25 | list(APPEND final_message "-- PATH config --") |
| @@ -30,5 +30,5 @@ list(APPEND final_message "Includedir: ${includedir}") | |||
| 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") | 30 | list(APPEND final_message "Datarootdir: ${datarootdir}") |
| 31 | list(APPEND final_message "Datadir: ${datadir}") | 31 | list(APPEND final_message "Datadir: ${datadir}") |
| 32 | 32 | ||
| 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/xbmc\" | 33 | set(PATH_DEFINES -DBIN_INSTALL_PATH=\"${libdir}/kodi\" |
| 34 | -DINSTALL_PATH=\"${datarootdir}/xbmc\") | 34 | -DINSTALL_PATH=\"${datarootdir}/kodi\") |
