diff options
Diffstat (limited to 'project/cmake/scripts/common/PrepareEnv.cmake')
| -rw-r--r-- | project/cmake/scripts/common/PrepareEnv.cmake | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/project/cmake/scripts/common/PrepareEnv.cmake b/project/cmake/scripts/common/PrepareEnv.cmake deleted file mode 100644 index 51be739..0000000 --- a/project/cmake/scripts/common/PrepareEnv.cmake +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | # parse version.txt and libKODI_guilib.h to get the version and API info | ||
| 2 | include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/Macros.cmake) | ||
| 3 | core_find_versions() | ||
| 4 | |||
| 5 | # in case we need to download something, set KODI_MIRROR to the default if not alread set | ||
| 6 | if(NOT DEFINED KODI_MIRROR) | ||
| 7 | set(KODI_MIRROR "http://mirrors.kodi.tv") | ||
| 8 | endif() | ||
| 9 | |||
| 10 | ### copy all the addon binding header files to include/kodi | ||
| 11 | # make sure include/kodi exists and is empty | ||
| 12 | set(APP_LIB_DIR ${ADDON_DEPENDS_PATH}/lib/${APP_NAME_LC}) | ||
| 13 | if(NOT EXISTS "${APP_LIB_DIR}/") | ||
| 14 | file(MAKE_DIRECTORY ${APP_LIB_DIR}) | ||
| 15 | endif() | ||
| 16 | |||
| 17 | set(APP_DATA_DIR ${ADDON_DEPENDS_PATH}/share/${APP_NAME_LC}) | ||
| 18 | if(NOT EXISTS "${APP_DATA_DIR}/") | ||
| 19 | file(MAKE_DIRECTORY ${APP_DATA_DIR}) | ||
| 20 | endif() | ||
| 21 | |||
| 22 | set(APP_INCLUDE_DIR ${ADDON_DEPENDS_PATH}/include/${APP_NAME_LC}) | ||
| 23 | if(NOT EXISTS "${APP_INCLUDE_DIR}/") | ||
| 24 | file(MAKE_DIRECTORY ${APP_INCLUDE_DIR}) | ||
| 25 | endif() | ||
| 26 | |||
| 27 | # make sure C++11 is always set | ||
| 28 | if(NOT WIN32) | ||
| 29 | string(REGEX MATCH "-std=(gnu|c)\\+\\+11" cxx11flag "${CMAKE_CXX_FLAGS}") | ||
| 30 | if(NOT cxx11flag) | ||
| 31 | set(CXX11_SWITCH "-std=c++11") | ||
| 32 | endif() | ||
| 33 | endif() | ||
| 34 | |||
| 35 | # generate the proper KodiConfig.cmake file | ||
| 36 | configure_file(${CORE_SOURCE_DIR}/project/cmake/KodiConfig.cmake.in ${APP_LIB_DIR}/KodiConfig.cmake @ONLY) | ||
| 37 | |||
| 38 | # copy cmake helpers to lib/kodi | ||
| 39 | file(COPY ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddonHelpers.cmake | ||
| 40 | ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddOptions.cmake | ||
| 41 | DESTINATION ${APP_LIB_DIR}) | ||
| 42 | |||
| 43 | ### copy all the addon binding header files to include/kodi | ||
| 44 | # parse addon-bindings.mk to get the list of header files to copy | ||
| 45 | core_file_read_filtered(bindings ${CORE_SOURCE_DIR}/xbmc/addons/addon-bindings.mk) | ||
| 46 | foreach(binding ${bindings}) | ||
| 47 | string(REPLACE " =" ";" binding "${binding}") | ||
| 48 | string(REPLACE "+=" ";" binding "${binding}") | ||
| 49 | list(GET binding 1 header) | ||
| 50 | # copy the header file to include/kodi | ||
| 51 | configure_file(${CORE_SOURCE_DIR}/${header} ${APP_INCLUDE_DIR} COPYONLY) | ||
| 52 | endforeach() | ||
| 53 | |||
| 54 | ### processing additional tools required by the platform | ||
| 55 | if(EXISTS ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/) | ||
| 56 | file(GLOB platform_tools ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/*.cmake) | ||
| 57 | foreach(platform_tool ${platform_tools}) | ||
| 58 | get_filename_component(platform_tool_name ${platform_tool} NAME_WE) | ||
| 59 | message(STATUS "Processing ${CORE_SYSTEM_NAME} specific tool: ${platform_tool_name}") | ||
| 60 | |||
| 61 | # include the file | ||
| 62 | include(${platform_tool}) | ||
| 63 | endforeach() | ||
| 64 | endif() | ||
