Mercurial > hg > orthanc-wsi
changeset 16:7a88c614be04
preparing for precompiled headers
line wrap: on
line diff
--- a/Applications/CMakeLists.txt Thu Oct 27 10:07:56 2016 +0200 +++ b/Applications/CMakeLists.txt Thu Oct 27 11:01:26 2016 +0200 @@ -58,6 +58,7 @@ include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake) include(${ORTHANC_ROOT}/Resources/CMake/AutoGeneratedCode.cmake) include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake) +include(${ORTHANC_ROOT}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake) # Third-party components shipped with Orthanc include(${ORTHANC_ROOT}/Resources/CMake/DcmtkConfiguration.cmake) @@ -100,18 +101,42 @@ ##################################################################### -## Create the static library containing the framework +## Create the list of the source files that depend upon the +## precompiled headers ##################################################################### -EmbedResources( - ${DCMTK_DICTIONARIES} - BRIGHTFIELD_OPTICAL_PATH ${ORTHANC_WSI_DIR}/Resources/BrightfieldOpticalPath.json - SAMPLE_DATASET ${ORTHANC_WSI_DIR}/Resources/SampleDataset.json - SRGB_ICC_PROFILE ${ORTHANC_WSI_DIR}/Resources/sRGB.icc +set(ORTHANC_CORE_SOURCES + ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp + ${ORTHANC_ROOT}/Core/DicomFormat/DicomArray.cpp + ${ORTHANC_ROOT}/Core/DicomFormat/DicomMap.cpp + ${ORTHANC_ROOT}/Core/DicomFormat/DicomTag.cpp + ${ORTHANC_ROOT}/Core/DicomFormat/DicomValue.cpp + ${ORTHANC_ROOT}/Core/Enumerations.cpp + ${ORTHANC_ROOT}/Core/HttpClient.cpp + ${ORTHANC_ROOT}/Core/Images/IImageWriter.cpp + ${ORTHANC_ROOT}/Core/Images/Image.cpp + ${ORTHANC_ROOT}/Core/Images/ImageAccessor.cpp + ${ORTHANC_ROOT}/Core/Images/ImageBuffer.cpp + ${ORTHANC_ROOT}/Core/Images/ImageProcessing.cpp + ${ORTHANC_ROOT}/Core/Images/JpegErrorManager.cpp + ${ORTHANC_ROOT}/Core/Images/JpegReader.cpp + ${ORTHANC_ROOT}/Core/Images/JpegWriter.cpp + ${ORTHANC_ROOT}/Core/Images/PngReader.cpp + ${ORTHANC_ROOT}/Core/Images/PngWriter.cpp + ${ORTHANC_ROOT}/Core/Logging.cpp + ${ORTHANC_ROOT}/Core/MultiThreading/BagOfTasksProcessor.cpp + ${ORTHANC_ROOT}/Core/MultiThreading/SharedMessageQueue.cpp + ${ORTHANC_ROOT}/Core/Toolbox.cpp + ${ORTHANC_ROOT}/Core/Uuid.cpp + ${ORTHANC_ROOT}/Core/WebServiceParameters.cpp + ${ORTHANC_ROOT}/OrthancServer/FromDcmtkBridge.cpp + ${ORTHANC_ROOT}/OrthancServer/ServerEnumerations.cpp + ${ORTHANC_ROOT}/OrthancServer/ToDcmtkBridge.cpp + ${ORTHANC_ROOT}/Plugins/Engine/SharedLibrary.cpp + ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp ) - -add_library(OrthancWSIFramework STATIC +set(ORTHANC_WSI_SOURCES #${ORTHANC_WSI_DIR}/Framework/Messaging/PluginOrthancConnection.cpp ${ORTHANC_WSI_DIR}/Framework/Algorithms/PyramidReader.cpp ${ORTHANC_WSI_DIR}/Framework/Algorithms/ReconstructPyramidCommand.cpp @@ -144,35 +169,40 @@ ${ORTHANC_WSI_DIR}/Framework/Outputs/MultiframeDicomWriter.cpp ${ORTHANC_WSI_DIR}/Framework/Outputs/PyramidWriterBase.cpp ${ORTHANC_WSI_DIR}/Framework/Outputs/TruncatedPyramidWriter.cpp + ) - ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp - ${ORTHANC_ROOT}/Core/DicomFormat/DicomArray.cpp - ${ORTHANC_ROOT}/Core/DicomFormat/DicomMap.cpp - ${ORTHANC_ROOT}/Core/DicomFormat/DicomTag.cpp - ${ORTHANC_ROOT}/Core/DicomFormat/DicomValue.cpp - ${ORTHANC_ROOT}/Core/Enumerations.cpp - ${ORTHANC_ROOT}/Core/HttpClient.cpp - ${ORTHANC_ROOT}/Core/Images/IImageWriter.cpp - ${ORTHANC_ROOT}/Core/Images/Image.cpp - ${ORTHANC_ROOT}/Core/Images/ImageAccessor.cpp - ${ORTHANC_ROOT}/Core/Images/ImageBuffer.cpp - ${ORTHANC_ROOT}/Core/Images/ImageProcessing.cpp - ${ORTHANC_ROOT}/Core/Images/JpegErrorManager.cpp - ${ORTHANC_ROOT}/Core/Images/JpegReader.cpp - ${ORTHANC_ROOT}/Core/Images/JpegWriter.cpp - ${ORTHANC_ROOT}/Core/Images/PngReader.cpp - ${ORTHANC_ROOT}/Core/Images/PngWriter.cpp - ${ORTHANC_ROOT}/Core/Logging.cpp - ${ORTHANC_ROOT}/Core/MultiThreading/BagOfTasksProcessor.cpp - ${ORTHANC_ROOT}/Core/MultiThreading/SharedMessageQueue.cpp - ${ORTHANC_ROOT}/Core/Toolbox.cpp - ${ORTHANC_ROOT}/Core/Uuid.cpp - ${ORTHANC_ROOT}/Core/WebServiceParameters.cpp - ${ORTHANC_ROOT}/OrthancServer/FromDcmtkBridge.cpp - ${ORTHANC_ROOT}/OrthancServer/ServerEnumerations.cpp - ${ORTHANC_ROOT}/OrthancServer/ToDcmtkBridge.cpp - ${ORTHANC_ROOT}/Plugins/Engine/SharedLibrary.cpp - ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp + +##################################################################### +## Setup precompiled headers for Microsoft Visual Studio +##################################################################### + +if (MSVC) + add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) + + ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( + "PrecompiledHeaders.h" "${ORTHANC_WSI_DIR}/Orthanc/Core/PrecompiledHeaders.cpp" ORTHANC_CORE_SOURCES) + + ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( + "PrecompiledHeadersWSI.h" "${ORTHANC_WSI_DIR}/PrecompiledHeadersWSI.cpp" ORTHANC_WSI_SOURCES) +endif() + + +##################################################################### +## Create the static library containing the framework +##################################################################### + +EmbedResources( + ${DCMTK_DICTIONARIES} + BRIGHTFIELD_OPTICAL_PATH ${ORTHANC_WSI_DIR}/Resources/BrightfieldOpticalPath.json + SAMPLE_DATASET ${ORTHANC_WSI_DIR}/Resources/SampleDataset.json + SRGB_ICC_PROFILE ${ORTHANC_WSI_DIR}/Resources/sRGB.icc + ) + + +add_library(OrthancWSIFramework STATIC + ${ORTHANC_CORE_SOURCES} + ${ORTHANC_WSI_SOURCES} + ${AUTOGENERATED_SOURCES} # Mandatory components ${BOOST_SOURCES} @@ -187,8 +217,6 @@ # Optional components ${OPENSSL_SOURCES} ${CURL_SOURCES} - - ${AUTOGENERATED_SOURCES} )
--- a/Framework/Algorithms/PyramidReader.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Algorithms/PyramidReader.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "PyramidReader.h" #include "../ImageToolbox.h"
--- a/Framework/Algorithms/ReconstructPyramidCommand.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Algorithms/ReconstructPyramidCommand.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "ReconstructPyramidCommand.h" #include "../ImageToolbox.h"
--- a/Framework/Algorithms/TranscodeTileCommand.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Algorithms/TranscodeTileCommand.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "TranscodeTileCommand.h" #include "../Orthanc/Core/OrthancException.h"
--- a/Framework/DicomToolbox.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/DicomToolbox.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "PrecompiledHeadersWSI.h" #include "DicomToolbox.h" #include "Orthanc/Core/Logging.h"
--- a/Framework/DicomizerParameters.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/DicomizerParameters.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "PrecompiledHeadersWSI.h" #include "DicomizerParameters.h" #include "Messaging/FolderTarget.h"
--- a/Framework/Enumerations.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Enumerations.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "PrecompiledHeadersWSI.h" #include "Enumerations.h" #include "Jpeg2000Reader.h"
--- a/Framework/ImageToolbox.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/ImageToolbox.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "PrecompiledHeadersWSI.h" #include "ImageToolbox.h" #include "Jpeg2000Reader.h"
--- a/Framework/ImagedVolumeParameters.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/ImagedVolumeParameters.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "PrecompiledHeadersWSI.h" #include "ImagedVolumeParameters.h" #include "Orthanc/Core/OrthancException.h"
--- a/Framework/Inputs/DecodedTiledPyramid.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/DecodedTiledPyramid.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "DecodedTiledPyramid.h" #include "../ImageToolbox.h"
--- a/Framework/Inputs/DicomPyramid.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/DicomPyramid.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "DicomPyramid.h" #include "../DicomToolbox.h"
--- a/Framework/Inputs/DicomPyramidInstance.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/DicomPyramidInstance.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "DicomPyramidInstance.h" #include "../Orthanc/Core/Logging.h"
--- a/Framework/Inputs/DicomPyramidLevel.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/DicomPyramidLevel.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "DicomPyramidLevel.h" #include "../Orthanc/Core/Logging.h"
--- a/Framework/Inputs/HierarchicalTiff.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/HierarchicalTiff.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "HierarchicalTiff.h" #include "../Orthanc/Core/Logging.h"
--- a/Framework/Inputs/OpenSlideLibrary.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/OpenSlideLibrary.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "OpenSlideLibrary.h" #include "../Orthanc/Core/Logging.h"
--- a/Framework/Inputs/OpenSlidePyramid.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/OpenSlidePyramid.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "OpenSlidePyramid.h" #include "../Orthanc/Core/Images/ImageProcessing.h"
--- a/Framework/Inputs/PyramidWithRawTiles.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/PyramidWithRawTiles.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "PyramidWithRawTiles.h" #include "../Orthanc/Core/Images/PngReader.h"
--- a/Framework/Inputs/SingleLevelDecodedPyramid.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/SingleLevelDecodedPyramid.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "SingleLevelDecodedPyramid.h" #include "../ImageToolbox.h"
--- a/Framework/Inputs/TiledPyramidStatistics.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Inputs/TiledPyramidStatistics.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "TiledPyramidStatistics.h" #include "../Orthanc/Core/Logging.h"
--- a/Framework/Jpeg2000Reader.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Jpeg2000Reader.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "PrecompiledHeadersWSI.h" #include "Jpeg2000Reader.h" #include "Orthanc/Core/OrthancException.h"
--- a/Framework/Jpeg2000Writer.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Jpeg2000Writer.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "PrecompiledHeadersWSI.h" #include "Jpeg2000Writer.h" #include "Orthanc/Core/ChunkedBuffer.h"
--- a/Framework/Messaging/CurlOrthancConnection.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Messaging/CurlOrthancConnection.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "CurlOrthancConnection.h" #include "../Orthanc/Core/OrthancException.h"
--- a/Framework/Messaging/FolderTarget.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Messaging/FolderTarget.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "FolderTarget.h" #include "../Orthanc/Core/Toolbox.h"
--- a/Framework/Messaging/IOrthancConnection.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Messaging/IOrthancConnection.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "IOrthancConnection.h" #include "../Orthanc/Core/Logging.h"
--- a/Framework/Messaging/OrthancConnectionBase.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Messaging/OrthancConnectionBase.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "OrthancConnectionBase.h" namespace OrthancWSI
--- a/Framework/Messaging/OrthancTarget.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Messaging/OrthancTarget.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "OrthancTarget.h" #include "CurlOrthancConnection.h"
--- a/Framework/Messaging/PluginOrthancConnection.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Messaging/PluginOrthancConnection.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "PluginOrthancConnection.h" #include "../Orthanc/Core/OrthancException.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Framework/Orthanc/Resources/CMake/VisualStudioPrecompiledHeaders.cmake Thu Oct 27 11:01:26 2016 +0200 @@ -0,0 +1,14 @@ +macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources) + get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE) + set(PrecompiledBinary "${PrecompiledBasename}_$(ConfigurationName).pch") + + set_source_files_properties(${PrecompiledSource} + PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\"" + OBJECT_OUTPUTS "${PrecompiledBinary}") + + set_source_files_properties(${${Sources}} + PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\"" + OBJECT_DEPENDS "${PrecompiledBinary}") + + list(APPEND ${Sources} ${PrecompiledSource}) +endmacro()
--- a/Framework/Outputs/DicomPyramidWriter.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Outputs/DicomPyramidWriter.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "DicomPyramidWriter.h" #include "../DicomToolbox.h"
--- a/Framework/Outputs/HierarchicalTiffWriter.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Outputs/HierarchicalTiffWriter.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "HierarchicalTiffWriter.h" #include "../Orthanc/Core/Logging.h"
--- a/Framework/Outputs/InMemoryTiledImage.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Outputs/InMemoryTiledImage.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "InMemoryTiledImage.h" #include "../ImageToolbox.h"
--- a/Framework/Outputs/MultiframeDicomWriter.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Outputs/MultiframeDicomWriter.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "MultiframeDicomWriter.h" #include "../Orthanc/Core/OrthancException.h"
--- a/Framework/Outputs/PyramidWriterBase.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Outputs/PyramidWriterBase.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "PyramidWriterBase.h" #include "../ImageToolbox.h"
--- a/Framework/Outputs/TruncatedPyramidWriter.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/Framework/Outputs/TruncatedPyramidWriter.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../PrecompiledHeadersWSI.h" #include "TruncatedPyramidWriter.h" #include "../Orthanc/Core/OrthancException.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Framework/PrecompiledHeadersWSI.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -0,0 +1,21 @@ +/** + * Orthanc - A Lightweight, RESTful DICOM Store + * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics + * Department, University Hospital of Liege, Belgium + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + **/ + + +#include "PrecompiledHeadersWSI.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Framework/PrecompiledHeadersWSI.h Thu Oct 27 11:01:26 2016 +0200 @@ -0,0 +1,34 @@ +/** + * Orthanc - A Lightweight, RESTful DICOM Store + * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics + * Department, University Hospital of Liege, Belgium + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + **/ + + +#pragma once + +#if ORTHANC_USE_PRECOMPILED_HEADERS == 1 + +#include "Orthanc/Core/PrecompiledHeaders.h" + +#include "DicomToolbox.h" +#include "ImageToolbox.h" +#include "Inputs/ITiledPyramid.h" +#include "Messaging/IFileTarget.h" +#include "Messaging/IOrthancConnection.h" +#include "Outputs/IPyramidWriter.h" + +#endif
--- a/Resources/SyncOrthancFolder.py Thu Oct 27 10:07:56 2016 +0200 +++ b/Resources/SyncOrthancFolder.py Thu Oct 27 11:01:26 2016 +0200 @@ -59,10 +59,10 @@ 'Core/MultiThreading/BagOfTasks.h', 'Core/MultiThreading/BagOfTasksProcessor.cpp', 'Core/MultiThreading/BagOfTasksProcessor.h', + 'Core/MultiThreading/Semaphore.cpp', + 'Core/MultiThreading/Semaphore.h', 'Core/MultiThreading/SharedMessageQueue.cpp', 'Core/MultiThreading/SharedMessageQueue.h', - 'Core/MultiThreading/Semaphore.cpp', - 'Core/MultiThreading/Semaphore.h', 'Core/OrthancException.h', 'Core/PrecompiledHeaders.h', 'Core/Toolbox.cpp', @@ -94,6 +94,7 @@ 'Resources/CMake/LibJpegConfiguration.cmake', 'Resources/CMake/LibPngConfiguration.cmake', 'Resources/CMake/OpenSslConfiguration.cmake', + 'Resources/CMake/VisualStudioPrecompiledHeaders.cmake', 'Resources/CMake/ZlibConfiguration.cmake', 'Resources/EmbedResources.py', 'Resources/MinGW-W64-Toolchain32.cmake',
--- a/ViewerPlugin/CMakeLists.txt Thu Oct 27 10:07:56 2016 +0200 +++ b/ViewerPlugin/CMakeLists.txt Thu Oct 27 11:01:26 2016 +0200 @@ -44,6 +44,7 @@ include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake) include(${ORTHANC_ROOT}/Resources/CMake/AutoGeneratedCode.cmake) include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake) +include(${ORTHANC_ROOT}/Resources/CMake/VisualStudioPrecompiledHeaders.cmake) # Third-party components shipped with Orthanc include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake) @@ -152,25 +153,11 @@ ##################################################################### -## Create the plugin +## Create the list of the source files that depend upon the +## precompiled headers ##################################################################### -add_library(OrthancWSI SHARED - Plugin.cpp - - ${ORTHANC_WSI_DIR}/Framework/DicomToolbox.cpp - ${ORTHANC_WSI_DIR}/Framework/Enumerations.cpp - ${ORTHANC_WSI_DIR}/Framework/ImageToolbox.cpp - ${ORTHANC_WSI_DIR}/Framework/Inputs/DicomPyramid.cpp - ${ORTHANC_WSI_DIR}/Framework/Inputs/DicomPyramidInstance.cpp - ${ORTHANC_WSI_DIR}/Framework/Inputs/DicomPyramidLevel.cpp - ${ORTHANC_WSI_DIR}/Framework/Inputs/PyramidWithRawTiles.cpp - ${ORTHANC_WSI_DIR}/Framework/Jpeg2000Reader.cpp - ${ORTHANC_WSI_DIR}/Framework/Jpeg2000Writer.cpp - ${ORTHANC_WSI_DIR}/Framework/Messaging/IOrthancConnection.cpp - ${ORTHANC_WSI_DIR}/Framework/Messaging/OrthancConnectionBase.cpp - ${ORTHANC_WSI_DIR}/Framework/Messaging/PluginOrthancConnection.cpp - +set(ORTHANC_CORE_SOURCES ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp ${ORTHANC_ROOT}/Core/Enumerations.cpp ${ORTHANC_ROOT}/Core/Images/IImageWriter.cpp @@ -187,7 +174,47 @@ ${ORTHANC_ROOT}/Core/MultiThreading/Semaphore.cpp ${ORTHANC_ROOT}/Core/Toolbox.cpp ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp + ) +set(ORTHANC_WSI_SOURCES + Plugin.cpp + ${ORTHANC_WSI_DIR}/Framework/DicomToolbox.cpp + ${ORTHANC_WSI_DIR}/Framework/Enumerations.cpp + ${ORTHANC_WSI_DIR}/Framework/ImageToolbox.cpp + ${ORTHANC_WSI_DIR}/Framework/Inputs/DicomPyramid.cpp + ${ORTHANC_WSI_DIR}/Framework/Inputs/DicomPyramidInstance.cpp + ${ORTHANC_WSI_DIR}/Framework/Inputs/DicomPyramidLevel.cpp + ${ORTHANC_WSI_DIR}/Framework/Inputs/PyramidWithRawTiles.cpp + ${ORTHANC_WSI_DIR}/Framework/Jpeg2000Reader.cpp + ${ORTHANC_WSI_DIR}/Framework/Jpeg2000Writer.cpp + ${ORTHANC_WSI_DIR}/Framework/Messaging/IOrthancConnection.cpp + ${ORTHANC_WSI_DIR}/Framework/Messaging/OrthancConnectionBase.cpp + ${ORTHANC_WSI_DIR}/Framework/Messaging/PluginOrthancConnection.cpp + ) + + +##################################################################### +## Setup precompiled headers for Microsoft Visual Studio +##################################################################### + +if (MSVC) + add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) + + ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( + "PrecompiledHeaders.h" "${ORTHANC_WSI_DIR}/Orthanc/Core/PrecompiledHeaders.cpp" ORTHANC_CORE_SOURCES) + + ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( + "PrecompiledHeadersWSI.h" "${ORTHANC_WSI_DIR}/PrecompiledHeadersWSI.cpp" ORTHANC_WSI_SOURCES) +endif() + + +##################################################################### +## Create the plugin +##################################################################### + +add_library(OrthancWSI SHARED + ${ORTHANC_CORE_SOURCES} + ${ORTHANC_WSI_SOURCES} ${AUTOGENERATED_SOURCES} # Mandatory components
--- a/ViewerPlugin/Plugin.cpp Thu Oct 27 10:07:56 2016 +0200 +++ b/ViewerPlugin/Plugin.cpp Thu Oct 27 11:01:26 2016 +0200 @@ -18,6 +18,7 @@ **/ +#include "../Framework/PrecompiledHeadersWSI.h" #include "../Framework/Inputs/DicomPyramid.h" #include "../Framework/Jpeg2000Reader.h" #include "../Framework/Messaging/PluginOrthancConnection.h"