-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cmake] fix set of APP_RENDER_SYSTEM on KodiConfig.cmake #15642
Conversation
file(GLOB _platformnames RELATIVE ${CORE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/ | ||
${CORE_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}") |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
98fa02f
to
e77f7c3
Compare
How is the state about them, OK to bring in? |
set(PLATFORM_USED_SOURCE_DIR ${CORE_SOURCE_DIR}) | ||
else() | ||
set(PLATFORM_USED_SOURCE_DIR ${CMAKE_SOURCE_DIR}) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain this block. Both kodi and addons have CORE_SOURCE_DIR defined and pointing to the same main kodi source root, so we should be able to use CORE_SOURCE_DIR directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a bit a hen and egg problem.
On Kodi build it must be included on begin and CORE_SOURCE_DIR
not set:
https://github.com/xbmc/xbmc/blob/master/CMakeLists.txt#L32
This then becomes set by https://github.com/xbmc/xbmc/blob/master/CMakeLists.txt#L36, and I think https://github.com/xbmc/xbmc/blob/master/cmake/scripts/common/Macros.cmake#L8 need a bit the defines from Platform.cmake.
EDIT: Am unsure to change the place and not inadvertently bring in a hidden mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from a quick look it shouldn't be a problem to set CORE_SOURCE_DIR on top of the main CMakeLists.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have checked, it does not work in other way without a bigger rewrite.
Platform.cmake
define theCORE_SYSTEM_NAME
CORE_SYSTEM_NAME
required byMacros.cmake
CORE_SOURCE_DIR
oncommon/Macros.cmake
not allowed to set before, otherwise${CORE_SYSTEM_NAME}/Macros.cmake
is not included
Not sure if this request fix something on my screensavers.rsxs Jenkins problem, but maybe it bring something :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wsnipex what you think about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this should be refactored, but since that needs deeper changes we can leave it as is for v18. But please add a TODO comment that this should be fixed for v19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also heard that v19 is planning to restructure the CMake for addons. Maybe we could integrate it with it (or maybe it's already ;-)). Otherwise, I will see what can be done.
e77f7c3
to
3f0b2e7
Compare
b08b6a9
to
84d607d
Compare
In the implementation of GLES under Windows found the foolish finding of OpenGL. This seems to exist systematically and makes it a little harder. Then found that "APP_RENDER_SYSTEM" of "KodiConfig.cmake" is not defined correctly (empty defined). This request fixes this and uses the "platform" folder. Parts of "Platform.cmake" are also included in PrepareEnv.cmake. TODO: Refactor on v19 to remove the if/else usage
84d607d
to
34d0c4a
Compare
@AlwinEsch This broke compiling binary addons via depends for GBM and Wayland platform. |
Can you give the error output, if not easy to fix this request becomes reverted from me. |
|
With the include of Platform.cmake to have for addons is the GBM_RENDER_SYSTEM not defined, this becomes set from "./tools/depends/target/Toolchain.cmake" but on a other place. This remove the change, but after the release must be the cmake workflow cleaned up. There are some hen and egg problems and maybe some hidden faults where a value becomes checked which becomes never available.
[cmake] partly revert #15642 to have wayland and GBM working
With the include of Platform.cmake to have for addons is the GBM_RENDER_SYSTEM not defined, this becomes set from "./tools/depends/target/Toolchain.cmake" but on a other place. This remove the change, but after the release must be the cmake workflow cleaned up. There are some hen and egg problems and maybe some hidden faults where a value becomes checked which becomes never available.
With the include of Platform.cmake to have for addons is the GBM_RENDER_SYSTEM not defined, this becomes set from "./tools/depends/target/Toolchain.cmake" but on a other place. This remove the change, but after the release must be the cmake workflow cleaned up. There are some hen and egg problems and maybe some hidden faults where a value becomes checked which becomes never available.
With the include of Platform.cmake to have for addons is the GBM_RENDER_SYSTEM not defined, this becomes set from "./tools/depends/target/Toolchain.cmake" but on a other place. This remove the change, but after the release must be the cmake workflow cleaned up. There are some hen and egg problems and maybe some hidden faults where a value becomes checked which becomes never available.
Description
In the implementation of GLES under Windows found the foolish finding of OpenGL. This seems to exist systematically and makes it a little harder. Then found that "APP_RENDER_SYSTEM" of "KodiConfig.cmake" is not defined correctly (empty defined).
This request fixes this and uses the "platform" folder.
Parts of "Platform.cmake" are also included in PrepareEnv.cmake.
But good to include them also in
PrepareEnv.cmake
to fix for addons?Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of change
Checklist: