Skip to content

Commit

Permalink
Merge pull request #10946 from Kwiboo/cmake-win32
Browse files Browse the repository at this point in the history
[cmake/win32] fixes for building with abnormal configuration
  • Loading branch information
Philipp Temminghoff committed Dec 9, 2016
2 parents e394eb3 + daafecf commit bfd9d00
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion project/cmake/CMakeLists.txt
Expand Up @@ -347,7 +347,7 @@ unset(_MAIN_LIBRARIES)
if(WIN32)
set_target_properties(${APP_NAME_LC} PROPERTIES WIN32_EXECUTABLE ON)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME_LC})
target_sources(kodi PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/win32/app.manifest)
target_sources(${APP_NAME_LC} PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/win32/app.manifest)
elseif(CORE_SYSTEM_NAME STREQUAL android)
# Nothing
else()
Expand Down
2 changes: 1 addition & 1 deletion project/cmake/scripts/common/Macros.cmake
Expand Up @@ -595,9 +595,9 @@ macro(core_find_versions)
set(APP_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR})
if(APP_VERSION_TAG)
set(APP_VERSION ${APP_VERSION}-${APP_VERSION_TAG})
string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC)
endif()
string(REPLACE "." "," FILE_VERSION ${APP_ADDON_API}.0)
string(TOLOWER ${APP_VERSION_TAG} APP_VERSION_TAG_LC)
file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version REGEX "^.*GUILIB_API_VERSION (.*)$")
string(REGEX REPLACE ".*\"(.*)\"" "\\1" guilib_version ${guilib_version})
file(STRINGS ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h guilib_version_min REGEX "^.*GUILIB_MIN_API_VERSION (.*)$")
Expand Down
4 changes: 4 additions & 0 deletions xbmc/storage/windows/Win32StorageProvider.cpp
Expand Up @@ -37,12 +37,14 @@ void CWin32StorageProvider::Initialize()
else
CLog::Log(LOGDEBUG, "%s: No optical drive found.", __FUNCTION__);

#ifdef HAS_DVD_DRIVE
// Can be removed once the StorageHandler supports optical media
VECSOURCES::const_iterator it;
for(it=vShare.begin();it!=vShare.end();++it)
if(g_mediaManager.GetDriveStatus(it->strPath) == DRIVE_CLOSED_MEDIA_PRESENT)
CJobManager::GetInstance().AddJob(new CDetectDisc(it->strPath, false), NULL);
// remove end
#endif
}

void CWin32StorageProvider::GetLocalDrives(VECSOURCES &localDrives)
Expand Down Expand Up @@ -95,6 +97,7 @@ CDetectDisc::CDetectDisc(const std::string &strPath, const bool bautorun)

bool CDetectDisc::DoWork()
{
#ifdef HAS_DVD_DRIVE
CLog::Log(LOGDEBUG, "%s: Optical media found in drive %s", __FUNCTION__, m_strPath.c_str());
CMediaSource share;
share.strPath = m_strPath;
Expand All @@ -108,5 +111,6 @@ bool CDetectDisc::DoWork()
share.m_ignore = true;
share.m_iDriveType = CMediaSource::SOURCE_TYPE_DVD;
g_mediaManager.AddAutoSource(share, m_bautorun);
#endif
return true;
}
3 changes: 0 additions & 3 deletions xbmc/system.h
Expand Up @@ -96,14 +96,11 @@
#if defined(TARGET_WINDOWS)
#define HAS_WIN32_NETWORK
#define HAS_IRSERVERSUITE
#define HAS_AUDIO
#define HAS_WEB_SERVER
#define HAS_WEB_INTERFACE
#define HAS_FILESYSTEM_SMB
#define HAS_ZEROCONF
#define HAS_MDNS
#define HAS_AIRTUNES
#define HAS_UPNP

#define DECLARE_UNUSED(a,b) a b;
#endif
Expand Down

0 comments on commit bfd9d00

Please sign in to comment.