summaryrefslogtreecommitdiffstats
path: root/cmake/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/scripts')
-rw-r--r--cmake/scripts/android/Install.cmake1
-rw-r--r--cmake/scripts/common/Macros.cmake16
-rw-r--r--cmake/scripts/common/Platform.cmake50
-rw-r--r--cmake/scripts/darwin_embedded/Install.cmake5
-rw-r--r--cmake/scripts/linux/ExtraTargets.cmake2
-rw-r--r--cmake/scripts/osx/ArchSetup.cmake2
-rw-r--r--cmake/scripts/osx/Install.cmake1
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake4
-rw-r--r--cmake/scripts/windowsstore/ArchSetup.cmake2
9 files changed, 56 insertions, 27 deletions
diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake
index 5b7b411..1dc33af 100644
--- a/cmake/scripts/android/Install.cmake
+++ b/cmake/scripts/android/Install.cmake
@@ -70,6 +70,7 @@ set(package_files strings.xml
70 src/XBMCProperties.java 70 src/XBMCProperties.java
71 src/XBMCVideoView.java 71 src/XBMCVideoView.java
72 src/XBMCFile.java 72 src/XBMCFile.java
73 src/XBMCURIUtils.java
73 src/channels/SyncChannelJobService.java 74 src/channels/SyncChannelJobService.java
74 src/channels/SyncProgramsJobService.java 75 src/channels/SyncProgramsJobService.java
75 src/channels/model/XBMCDatabase.java 76 src/channels/model/XBMCDatabase.java
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake
index d896651..757d3ee 100644
--- a/cmake/scripts/common/Macros.cmake
+++ b/cmake/scripts/common/Macros.cmake
@@ -221,11 +221,19 @@ function(copy_file_to_buildtree file)
221 endif() 221 endif()
222 222
223 if(NOT file STREQUAL ${CMAKE_BINARY_DIR}/${outfile}) 223 if(NOT file STREQUAL ${CMAKE_BINARY_DIR}/${outfile})
224 if(VERBOSE) 224 if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" OR NOT IS_SYMLINK "${file}")
225 message(STATUS "copy_file_to_buildtree - copying file: ${file} -> ${CMAKE_BINARY_DIR}/${outfile}") 225 if(VERBOSE)
226 message(STATUS "copy_file_to_buildtree - copying file: ${file} -> ${CMAKE_BINARY_DIR}/${outfile}")
227 endif()
228 file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake
229 "file(COPY \"${file}\" DESTINATION \"${CMAKE_BINARY_DIR}/${outdir}\")\n" )
230 else()
231 if(VERBOSE)
232 message(STATUS "copy_file_to_buildtree - copying symlinked file: ${file} -> ${CMAKE_BINARY_DIR}/${outfile}")
233 endif()
234 file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake
235 "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy_if_different \"${file}\" \"${CMAKE_BINARY_DIR}/${outfile}\")\n")
226 endif() 236 endif()
227 file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake
228 "file(COPY \"${file}\" DESTINATION \"${CMAKE_BINARY_DIR}/${outdir}\")\n")
229 endif() 237 endif()
230 238
231 if(NOT arg_NO_INSTALL) 239 if(NOT arg_NO_INSTALL)
diff --git a/cmake/scripts/common/Platform.cmake b/cmake/scripts/common/Platform.cmake
index 5ac233a..397d8d4 100644
--- a/cmake/scripts/common/Platform.cmake
+++ b/cmake/scripts/common/Platform.cmake
@@ -3,10 +3,13 @@ if(NOT CORE_SYSTEM_NAME)
3endif() 3endif()
4 4
5if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) 5if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd)
6 # Set default CORE_PLATFORM_NAME to X11 6 # Set default CORE_PLATFORM_NAME to X11 WAYLAND GBM
7 # This is overridden by user setting -DCORE_PLATFORM_NAME=<platform> 7 # This is overridden by user setting -DCORE_PLATFORM_NAME=<platform>
8 set(_DEFAULT_PLATFORM X11) 8 set(_DEFAULT_PLATFORM X11 WAYLAND GBM)
9 option(ENABLE_APP_AUTONAME "Enable renaming the binary according to windowing?" ON) 9
10 if(NOT APP_RENDER_SYSTEM)
11 message(SEND_ERROR "You need to decide whether you want to use GL- or GLES-based rendering. Please set APP_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".")
12 endif()
10else() 13else()
11 string(TOLOWER ${CORE_SYSTEM_NAME} _DEFAULT_PLATFORM) 14 string(TOLOWER ${CORE_SYSTEM_NAME} _DEFAULT_PLATFORM)
12endif() 15endif()
@@ -18,20 +21,37 @@ set(APP_BINARY_SUFFIX ".bin")
18# use the normalized to lower case CORE_PLATFORM_NAME_LC (see below) instead 21# use the normalized to lower case CORE_PLATFORM_NAME_LC (see below) instead
19# 22#
20if(NOT CORE_PLATFORM_NAME) 23if(NOT CORE_PLATFORM_NAME)
21 set(CORE_PLATFORM_NAME ${_DEFAULT_PLATFORM} CACHE STRING "Platform port to build") 24 set(CORE_PLATFORM_NAME ${_DEFAULT_PLATFORM})
22endif() 25endif()
26set(CORE_PLATFORM_NAME ${CORE_PLATFORM_NAME} CACHE STRING "Platform port to build" FORCE)
23unset(_DEFAULT_PLATFORM) 27unset(_DEFAULT_PLATFORM)
24string(TOLOWER ${CORE_PLATFORM_NAME} CORE_PLATFORM_NAME_LC)
25 28
26list(APPEND final_message "Platform: ${CORE_PLATFORM_NAME}") 29string(REPLACE " " ";" CORE_PLATFORM_NAME "${CORE_PLATFORM_NAME}")
27if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) 30foreach(platform IN LISTS CORE_PLATFORM_NAME)
28 include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) 31 string(TOLOWER ${platform} platform)
29 if(ENABLE_APP_AUTONAME) 32 list(APPEND CORE_PLATFORM_NAME_LC ${platform})
30 set(APP_BINARY_SUFFIX "-${CORE_PLATFORM_NAME_LC}") 33endforeach()
34
35string(REPLACE ";" " " CORE_PLATFORM_STRING "${CORE_PLATFORM_NAME_LC}")
36list(APPEND final_message "Platforms: ${CORE_PLATFORM_STRING}")
37
38if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd)
39 list(LENGTH CORE_PLATFORM_NAME_LC PLATFORM_COUNT)
40 if(PLATFORM_COUNT EQUAL 1)
41 option(ENABLE_APP_AUTONAME "Enable renaming the binary according to windowing?" ON)
42 if(ENABLE_APP_AUTONAME)
43 set(APP_BINARY_SUFFIX "-${CORE_PLATFORM_NAME_LC}")
44 endif()
31 endif() 45 endif()
32else()
33 file(GLOB _platformnames RELATIVE ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/
34 ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/*.cmake)
35 string(REPLACE ".cmake" " " _platformnames ${_platformnames})
36 message(FATAL_ERROR "invalid CORE_PLATFORM_NAME: ${CORE_PLATFORM_NAME_LC}\nValid platforms: ${_platformnames}")
37endif() 46endif()
47
48foreach(CORE_PLATFORM_LC IN LISTS CORE_PLATFORM_NAME_LC)
49 if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_LC}.cmake)
50 include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_LC}.cmake)
51 else()
52 file(GLOB _platformnames RELATIVE ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/
53 ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/*.cmake)
54 string(REPLACE ".cmake" " " _platformnames ${_platformnames})
55 message(FATAL_ERROR "invalid CORE_PLATFORM_NAME: ${CORE_PLATFORM_NAME_LC}\nValid platforms: ${_platformnames}")
56 endif()
57endforeach()
diff --git a/cmake/scripts/darwin_embedded/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake
index af18277..02464ee 100644
--- a/cmake/scripts/darwin_embedded/Install.cmake
+++ b/cmake/scripts/darwin_embedded/Install.cmake
@@ -122,11 +122,6 @@ endif()
122set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) 122set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..)
123configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in 123configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
124 ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh @ONLY) 124 ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh @ONLY)
125
126if(CORE_PLATFORM_NAME_LC STREQUAL ios)
127 configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in
128 ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh @ONLY)
129endif()
130 125
131add_custom_target(deb 126add_custom_target(deb
132 COMMAND sh ./mkdeb-darwin_embedded.sh ${CORE_BUILD_CONFIG} 127 COMMAND sh ./mkdeb-darwin_embedded.sh ${CORE_BUILD_CONFIG}
diff --git a/cmake/scripts/linux/ExtraTargets.cmake b/cmake/scripts/linux/ExtraTargets.cmake
index 37d196a..61c76a8 100644
--- a/cmake/scripts/linux/ExtraTargets.cmake
+++ b/cmake/scripts/linux/ExtraTargets.cmake
@@ -14,7 +14,7 @@ if(ENABLE_EVENTCLIENTS AND BLUETOOTH_FOUND)
14 endif() 14 endif()
15endif() 15endif()
16 16
17if(CORE_PLATFORM_NAME_LC STREQUAL "wayland") 17if("wayland" IN_LIST CORE_PLATFORM_NAME_LC)
18 # This cannot go into wayland.cmake since it requires the Wayland dependencies 18 # This cannot go into wayland.cmake since it requires the Wayland dependencies
19 # to already be resolved 19 # to already be resolved
20 set(PROTOCOL_XMLS "${WAYLANDPP_PROTOCOLS_DIR}/presentation-time.xml" 20 set(PROTOCOL_XMLS "${WAYLANDPP_PROTOCOLS_DIR}/presentation-time.xml"
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake
index 7d8f58b..f723aa2 100644
--- a/cmake/scripts/osx/ArchSetup.cmake
+++ b/cmake/scripts/osx/ArchSetup.cmake
@@ -23,6 +23,8 @@ else()
23 endif() 23 endif()
24endif() 24endif()
25 25
26set(CMAKE_OSX_ARCHITECTURES ${CPU})
27
26# Additional SYSTEM_DEFINES 28# Additional SYSTEM_DEFINES
27list(APPEND SYSTEM_DEFINES -DHAS_POSIX_NETWORK -DHAS_OSX_NETWORK -DHAS_SDL -DHAS_ZEROCONF) 29list(APPEND SYSTEM_DEFINES -DHAS_POSIX_NETWORK -DHAS_OSX_NETWORK -DHAS_SDL -DHAS_ZEROCONF)
28 30
diff --git a/cmake/scripts/osx/Install.cmake b/cmake/scripts/osx/Install.cmake
index 629bc09..2ae41f5 100644
--- a/cmake/scripts/osx/Install.cmake
+++ b/cmake/scripts/osx/Install.cmake
@@ -52,6 +52,7 @@ add_custom_target(dmg
52 "DEV_TEAM=${DEV_TEAM}" 52 "DEV_TEAM=${DEV_TEAM}"
53 "EXPANDED_CODE_SIGN_IDENTITY_NAME=${CODE_SIGN_IDENTITY}" 53 "EXPANDED_CODE_SIGN_IDENTITY_NAME=${CODE_SIGN_IDENTITY}"
54 "PLATFORM_NAME=${PLATFORM}" 54 "PLATFORM_NAME=${PLATFORM}"
55 "XCODE_BUILDTYPE=${CMAKE_CFG_INTDIR}"
55 ./mkdmg-osx.sh ${CORE_BUILD_CONFIG_LOWERCASED} 56 ./mkdmg-osx.sh ${CORE_BUILD_CONFIG_LOWERCASED}
56 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx) 57 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx)
57set_target_properties(dmg PROPERTIES FOLDER "Build Utilities") 58set_target_properties(dmg PROPERTIES FOLDER "Build Utilities")
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake
index f3628f2..9c382da 100644
--- a/cmake/scripts/windows/ArchSetup.cmake
+++ b/cmake/scripts/windows/ArchSetup.cmake
@@ -32,9 +32,11 @@ set(DEPS_FOLDER_RELATIVE project/BuildDependencies)
32set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH}) 32set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH})
33set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH}) 33set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH})
34 34
35# mingw libs
35list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR}) 36list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
36list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) 37list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
37list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}) 38# dependencies
39list(PREPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
38 40
39# -------- Compiler options --------- 41# -------- Compiler options ---------
40 42
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake
index ad55a01..5a90683 100644
--- a/cmake/scripts/windowsstore/ArchSetup.cmake
+++ b/cmake/scripts/windowsstore/ArchSetup.cmake
@@ -52,7 +52,7 @@ set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/win10-$
52list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR}) 52list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
53list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) 53list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
54# dependencies 54# dependencies
55list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR}) 55list(PREPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
56 56
57 57
58# -------- Compiler options --------- 58# -------- Compiler options ---------