summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/windows/ArchSetup.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/scripts/windows/ArchSetup.cmake')
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake25
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)
19set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs) 19set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs)
20
21set(CMAKE_SYSTEM_NAME Windows) 20set(CMAKE_SYSTEM_NAME Windows)
22list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH}) 21set(DEPS_FOLDER_RELATIVE project/BuildDependencies)
23list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH}/bin) 22set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH})
24list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}) 23set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH})
25list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies)
26set(PYTHON_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/include/python)
27 24
25list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR})
26list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
27list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR})
28set(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>)
42endif() 43endif()
43 44
45# Additional SYSTEM_DEFINES
46list(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.
45if(CMAKE_GENERATOR MATCHES "Visual Studio") 49if(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.
59if(${ARCH} STREQUAL win32) 63link_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)
63else()
64 link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin
65 ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/lib)
66endif()
67 64
68# Additional libraries 65# Additional libraries
69list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib 66list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib