aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlwin Esch <alwin.esch@web.de>2019-03-23 23:30:55 +0100
committerGitHub <noreply@github.com>2019-03-23 23:30:55 +0100
commit98d18d0a1edf4097efa2957864036a09bd4894a5 (patch)
treee3a0ba1e540230051d2c357f53e35d70a819ae06
parent5033b6fd4e99f17fcb8b8f202958b8136c03b3bd (diff)
parent40a5716acaea2596e2d2a99bf33cbdd79b3e403b (diff)
Merge pull request #15804 from AlwinEsch/partly-fix-cmake
[cmake] partly revert #15642 to have wayland and GBM working
-rw-r--r--cmake/scripts/common/Platform.cmake19
-rw-r--r--cmake/scripts/common/PrepareEnv.cmake1
2 files changed, 4 insertions, 16 deletions
diff --git a/cmake/scripts/common/Platform.cmake b/cmake/scripts/common/Platform.cmake
index 6d99c44563..5ac233a54d 100644
--- a/cmake/scripts/common/Platform.cmake
+++ b/cmake/scripts/common/Platform.cmake
@@ -1,15 +1,6 @@
if(NOT CORE_SYSTEM_NAME)
string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME)
endif()
-# Switch used path, if CORE_SOURCE_DIR is set use it (e.g. on addons build)
-# otherwise use the present source dir
-#
-# TODO: This should be refactored on v19 and the if usage removed!
-if(CORE_SOURCE_DIR)
- set(PLATFORM_USED_SOURCE_DIR ${CORE_SOURCE_DIR})
-else()
- set(PLATFORM_USED_SOURCE_DIR ${CMAKE_SOURCE_DIR})
-endif()
if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd)
# Set default CORE_PLATFORM_NAME to X11
@@ -33,16 +24,14 @@ unset(_DEFAULT_PLATFORM)
string(TOLOWER ${CORE_PLATFORM_NAME} CORE_PLATFORM_NAME_LC)
list(APPEND final_message "Platform: ${CORE_PLATFORM_NAME}")
-if(EXISTS ${PLATFORM_USED_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake)
- include(${PLATFORM_USED_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake)
+if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake)
+ include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake)
if(ENABLE_APP_AUTONAME)
set(APP_BINARY_SUFFIX "-${CORE_PLATFORM_NAME_LC}")
endif()
else()
- file(GLOB _platformnames RELATIVE ${PLATFORM_USED_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/
- ${PLATFORM_USED_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/*.cmake)
+ file(GLOB _platformnames RELATIVE ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/
+ ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/*.cmake)
string(REPLACE ".cmake" " " _platformnames ${_platformnames})
message(FATAL_ERROR "invalid CORE_PLATFORM_NAME: ${CORE_PLATFORM_NAME_LC}\nValid platforms: ${_platformnames}")
endif()
-
-unset(PLATFORM_USED_SOURCE_DIR)
diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake
index 867cd2c364..20dbaf60af 100644
--- a/cmake/scripts/common/PrepareEnv.cmake
+++ b/cmake/scripts/common/PrepareEnv.cmake
@@ -1,6 +1,5 @@
# parse version.txt and versions.h to get the version and API info
include(${CORE_SOURCE_DIR}/cmake/scripts/common/Macros.cmake)
-include(${CORE_SOURCE_DIR}/cmake/scripts/common/Platform.cmake)
core_find_versions()
# in case we need to download something, set KODI_MIRROR to the default if not already set