summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorprotomors <protomors@gmail.com>2017-11-08 05:41:08 +0600
committerGeorge Hazan <ghazan@miranda.im>2018-05-27 11:08:16 +0300
commit94caa45505f1d03397215888d48f6eebf2d3d647 (patch)
tree7cdb9ff84a4bcc48c92ae5455a30fd2c7b4273bd /cmake
parent10f115b6d4050443d559b82bc54d5f030c248a3e (diff)
CMake: Fix for precompiled headers with nmake.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/core.cmake4
-rw-r--r--cmake/lib.cmake4
-rw-r--r--cmake/plugin.cmake4
3 files changed, 6 insertions, 6 deletions
diff --git a/cmake/core.cmake b/cmake/core.cmake
index afb345d4a8..2c8b080dd2 100644
--- a/cmake/core.cmake
+++ b/cmake/core.cmake
@@ -3,8 +3,8 @@ file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc")
set(STDAFX "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.cxx")
if ((EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.h") AND (EXISTS ${STDAFX}))
file(GLOB PRECOMPILED_SOURCES "src/*.cpp")
- SET_SOURCE_FILES_PROPERTIES(${PRECOMPILED_SOURCES} PROPERTIES COMPILE_FLAGS "/Yu")
- SET_SOURCE_FILES_PROPERTIES(${STDAFX} PROPERTIES COMPILE_FLAGS "/Yc")
+ SET_SOURCE_FILES_PROPERTIES(${PRECOMPILED_SOURCES} PROPERTIES COMPILE_FLAGS "/Yu\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
+ SET_SOURCE_FILES_PROPERTIES(${STDAFX} PROPERTIES COMPILE_FLAGS "/Yc\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
add_library(${TARGET} SHARED ${STDAFX} ${SOURCES})
else()
add_library(${TARGET} SHARED ${SOURCES})
diff --git a/cmake/lib.cmake b/cmake/lib.cmake
index 33e940a663..d06145fe0b 100644
--- a/cmake/lib.cmake
+++ b/cmake/lib.cmake
@@ -1,8 +1,8 @@
set(STDAFX "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.cxx")
if ((EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.h") AND (EXISTS ${STDAFX}))
file(GLOB PRECOMPILED_SOURCES "src/*.cpp")
- SET_SOURCE_FILES_PROPERTIES(${PRECOMPILED_SOURCES} PROPERTIES COMPILE_FLAGS "/Yu")
- SET_SOURCE_FILES_PROPERTIES(${STDAFX} PROPERTIES COMPILE_FLAGS "/Yc")
+ SET_SOURCE_FILES_PROPERTIES(${PRECOMPILED_SOURCES} PROPERTIES COMPILE_FLAGS "/Yu\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
+ SET_SOURCE_FILES_PROPERTIES(${STDAFX} PROPERTIES COMPILE_FLAGS "/Yc\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
add_library(${TARGET} SHARED ${STDAFX} ${SOURCES})
else()
add_library(${TARGET} SHARED ${SOURCES})
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index ed830572d6..a15b2f5f81 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -1,8 +1,8 @@
set(STDAFX "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.cxx")
if ((EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/stdafx.h") AND (EXISTS ${STDAFX}))
file(GLOB PRECOMPILED_SOURCES "src/*.cpp")
- SET_SOURCE_FILES_PROPERTIES(${PRECOMPILED_SOURCES} PROPERTIES COMPILE_FLAGS "/Yu")
- SET_SOURCE_FILES_PROPERTIES(${STDAFX} PROPERTIES COMPILE_FLAGS "/Yc")
+ SET_SOURCE_FILES_PROPERTIES(${PRECOMPILED_SOURCES} PROPERTIES COMPILE_FLAGS "/Yu\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
+ SET_SOURCE_FILES_PROPERTIES(${STDAFX} PROPERTIES COMPILE_FLAGS "/Yc\"stdafx.h\" /Fp\"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.pch\"")
add_library(${TARGET} SHARED ${STDAFX} ${SOURCES})
else()
add_library(${TARGET} SHARED ${SOURCES})