diff options
Diffstat (limited to 'cmake/scripts/windows/ArchSetup.cmake')
| -rw-r--r-- | cmake/scripts/windows/ArchSetup.cmake | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake index d438b05..8e4f61d 100644 --- a/cmake/scripts/windows/ArchSetup.cmake +++ b/cmake/scripts/windows/ArchSetup.cmake | |||
| @@ -17,14 +17,15 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/win32/WinMain.cpp) | |||
| 17 | 17 | ||
| 18 | # Precompiled headers fail with per target output directory. (needs CMake 3.1) | 18 | # Precompiled headers fail with per target output directory. (needs CMake 3.1) |
| 19 | set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs) | 19 | set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs) |
| 20 | |||
| 21 | set(CMAKE_SYSTEM_NAME Windows) | 20 | set(CMAKE_SYSTEM_NAME Windows) |
| 22 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH}) | 21 | set(DEPS_FOLDER_RELATIVE project/BuildDependencies) |
| 23 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH}/bin) | 22 | set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH}) |
| 24 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}) | 23 | set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH}) |
| 25 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies) | ||
| 26 | set(PYTHON_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/include/python) | ||
| 27 | 24 | ||
| 25 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR}) | ||
| 26 | list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin) | ||
| 27 | list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR}) | ||
| 28 | set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python) | ||
| 28 | 29 | ||
| 29 | # -------- Compiler options --------- | 30 | # -------- Compiler options --------- |
| 30 | 31 | ||
| @@ -41,6 +42,9 @@ if(${ARCH} STREQUAL win32) | |||
| 41 | list(APPEND SYSTEM_DEFINES $<$<CONFIG:Debug>:-D_ITERATOR_DEBUG_LEVEL=0>) | 42 | list(APPEND SYSTEM_DEFINES $<$<CONFIG:Debug>:-D_ITERATOR_DEBUG_LEVEL=0>) |
| 42 | endif() | 43 | endif() |
| 43 | 44 | ||
| 45 | # Additional SYSTEM_DEFINES | ||
| 46 | list(APPEND SYSTEM_DEFINES -DHAS_IRSERVERSUITE -DHAS_WIN32_NETWORK -DHAS_FILESYSTEM_SMB) | ||
| 47 | |||
| 44 | # Make sure /FS is set for Visual Studio in order to prevent simultaneous access to pdb files. | 48 | # Make sure /FS is set for Visual Studio in order to prevent simultaneous access to pdb files. |
| 45 | if(CMAKE_GENERATOR MATCHES "Visual Studio") | 49 | if(CMAKE_GENERATOR MATCHES "Visual Studio") |
| 46 | set(CMAKE_CXX_FLAGS "/MP /FS ${CMAKE_CXX_FLAGS}") | 50 | set(CMAKE_CXX_FLAGS "/MP /FS ${CMAKE_CXX_FLAGS}") |
| @@ -56,14 +60,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") | |||
| 56 | 60 | ||
| 57 | # For #pragma comment(lib X) | 61 | # For #pragma comment(lib X) |
| 58 | # TODO: It would certainly be better to handle these libraries via CMake modules. | 62 | # TODO: It would certainly be better to handle these libraries via CMake modules. |
| 59 | if(${ARCH} STREQUAL win32) | 63 | link_directories(${DEPENDENCIES_DIR}/lib) |
| 60 | link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin | ||
| 61 | ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/lib | ||
| 62 | ${CMAKE_SOURCE_DIR}/project/BuildDependencies/lib) | ||
| 63 | else() | ||
| 64 | link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin | ||
| 65 | ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/lib) | ||
| 66 | endif() | ||
| 67 | 64 | ||
| 68 | # Additional libraries | 65 | # Additional libraries |
| 69 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib | 66 | list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib |
