changeset 3185:c6dab987f43a

changed VS precompiled headers to support Ninja + instructions to use Ninja & QtCreator on Windows
author Alain Mazy <alain@mazy.be>
date Fri, 01 Feb 2019 17:53:40 +0100
parents 07a2f637b76d
children 92bbc5274220
files INSTALL Resources/CMake/VisualStudioPrecompiledHeaders.cmake
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/INSTALL	Wed Jan 30 17:50:51 2019 +0100
+++ b/INSTALL	Fri Feb 01 17:53:40 2019 +0100
@@ -91,6 +91,20 @@
   Visual Studio that do not support C++11
 
 
+Native Windows build with Microsoft Visual Studio 2015, Ninja and QtCreator
+---------------------------------------------------------------------------
+
+Open a Visual Studio 2015 x64 Command Prompt.
+
+# cd [...]\OrthancBuild
+# cmake -G Ninja -DSTATIC_BUILD=ON [...]\Orthanc
+# ninja
+
+Then, you can open an existing project in QtCreator:
+* Select the CMakeLists.txt in [...]\Orthanc
+* Import build from [...]\OrthancBuild
+
+
 
 Cross-Compilation for Windows under GNU/Linux
 ---------------------------------------------
--- a/Resources/CMake/VisualStudioPrecompiledHeaders.cmake	Wed Jan 30 17:50:51 2019 +0100
+++ b/Resources/CMake/VisualStudioPrecompiledHeaders.cmake	Fri Feb 01 17:53:40 2019 +0100
@@ -1,6 +1,6 @@
 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources Target)
   get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE)
-  set(PrecompiledBinary "${PrecompiledBasename}_$(ConfigurationName).pch")
+  set(PrecompiledBinary "${PrecompiledBasename}_${CMAKE_BUILD_TYPE}_${CMAKE_GENERATOR_PLATFORM}.pch")
 
   set_source_files_properties(${PrecompiledSource}
     PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\""