Skip to content

Commit

Permalink
build components as DLLs in Visual Studio (#723)
Browse files Browse the repository at this point in the history
* build "scene" as a DLL

* exports from SCENE DLL

* build SIX as a DLL

* exports from SIX.DLL

* exports for UnitTest project

* exports for CSM project

* access the XMLControlRegistry instance through a function so there really is just a single instance

* build SIX.SICD as a DLL

* six.sicd DLL exports

* build SIX.SIDD as a DLL

* SIX.SIDD exports

* build CPHD as a DLL

* CHPD exports

* build cphd03 as a DLL

* CPHD03 exports

* build six.convert as a DLL
  • Loading branch information
J. Daniel Smith committed Nov 29, 2023
1 parent 8e8e931 commit 953e132
Show file tree
Hide file tree
Showing 177 changed files with 1,311 additions and 614 deletions.
3 changes: 1 addition & 2 deletions UnitTest/UnitTest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\cphd\include;$(SolutionDir)six\modules\c++\cphd03\include;$(SolutionDir)externals\nitro\modules\c\nrt\include;$(SolutionDir)externals\nitro\modules\c\nitf\include;$(SolutionDir)externals\nitro\modules\c++\nitf\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration);$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)out\install\$(Platform)-$(Configuration);$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;SIX_DEFAULT_SCHEMA_PATH=R"($(SolutionDir)install-$(Configuration)-$(Platform).$(PlatformToolset)\conf\schema\six)";%(PreprocessorDefinitions);_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING; CODA_OSS_LIBRARY_SHARED</PreprocessorDefinitions>
<UseFullPaths>true</UseFullPaths>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
Expand All @@ -85,14 +84,14 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\cphd\include;$(SolutionDir)six\modules\c++\cphd03\include;$(SolutionDir)externals\nitro\modules\c\nrt\include;$(SolutionDir)externals\nitro\modules\c\nitf\include;$(SolutionDir)externals\nitro\modules\c++\nitf\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration);$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)out\install\$(Platform)-$(Configuration);$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING; CODA_OSS_LIBRARY_SHARED</PreprocessorDefinitions>
<UseFullPaths>true</UseFullPaths>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<ConformanceMode>true</ConformanceMode>
<ControlFlowGuard>Guard</ControlFlowGuard>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
1 change: 1 addition & 0 deletions externals/coda-oss/modules/c++/coda-oss.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<Link>
<SubSystem>
Expand Down
6 changes: 4 additions & 2 deletions externals/coda-oss/modules/c++/io/include/io/Serializable.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __IO_SERIALIZABLE_H__
#define __IO_SERIALIZABLE_H__

#include "config/Exports.h"

#include "io/InputStream.h"
#include "io/OutputStream.h"

Expand All @@ -46,7 +48,7 @@ namespace io
* This object has a known derived type SOAPMessage, which is concretely
* defined to handle SOAP objects
*/
struct Serializable
struct CODA_OSS_API Serializable
{
Serializable() = default;
virtual ~Serializable() noexcept(false) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __PLUGIN_ERROR_HANDLER_H__
#define __PLUGIN_ERROR_HANDLER_H__

#include <import/except.h>
#include <import/sys.h>
#include <import/logging.h>

#include "config/Exports.h"

namespace plugin
{
class ErrorHandler
class CODA_OSS_API ErrorHandler
{
public:
ErrorHandler() {}
Expand All @@ -47,7 +49,7 @@ class ErrorHandler
virtual void onPluginError(except::Context& c) = 0;
};

class DefaultErrorHandler : public ErrorHandler
class CODA_OSS_API DefaultErrorHandler final : public ErrorHandler
{
public:
DefaultErrorHandler(logging::LoggerPtr logger = logging::LoggerPtr());
Expand Down
5 changes: 3 additions & 2 deletions externals/coda-oss/modules/c++/sys/include/sys/DLL.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/


#pragma once
#ifndef __SYS_DLL_H__
#define __SYS_DLL_H__

Expand Down Expand Up @@ -52,6 +52,7 @@ typedef void* DLL_FUNCTION_PTR;

#include "except/Exception.h"
#include "sys/Err.h"
#include "config/Exports.h"


namespace sys
Expand Down Expand Up @@ -124,7 +125,7 @@ struct DLLException : public except::Exception
*/


struct DLL
struct CODA_OSS_API DLL
{
/*!
* Construct a library object, but dont populate or load it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*
*/

#pragma once
#ifndef CODA_OSS_tiff_FileReader_h_INCLUDED_
#define CODA_OSS_tiff_FileReader_h_INCLUDED_
#pragma once

#include "tiff/TiffFileReader.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*
*/

#pragma once
#ifndef CODA_OSS_tiff_FileWriter_h_INCLUDED_
#define CODA_OSS_tiff_FileWriter_h_INCLUDED_
#pragma once

#include "tiff/TiffFileWriter.h"

Expand Down
6 changes: 4 additions & 2 deletions externals/coda-oss/modules/c++/tiff/include/tiff/Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_HEADER_H__
#define __TIFF_HEADER_H__

#include <import/io.h>
#include <config/Exports.h>

#include "tiff/Common.h"

namespace tiff
Expand All @@ -34,7 +36,7 @@ namespace tiff
* @class Header
* @brief Contains TIFF header information
*********************************************************************/
class Header : public io::Serializable
class CODA_OSS_API Header : public io::Serializable
{
public:
enum ByteOrder { MM, II };
Expand Down
6 changes: 4 additions & 2 deletions externals/coda-oss/modules/c++/tiff/include/tiff/IFD.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_IFD_H__
#define __TIFF_IFD_H__

#include <map>
#include <string>

#include <import/io.h>
#include <import/except.h>
#include <config/Exports.h>

#include "tiff/IFDEntry.h"
#include "tiff/KnownTags.h"
Expand All @@ -45,7 +47,7 @@ namespace tiff
* Contains functions for adding new entries to the IFD or adding
* values to a specific IFD entry.
*********************************************************************/
class IFD : public io::Serializable
class CODA_OSS_API IFD : public io::Serializable
{
public:
//! The IFDType
Expand Down
10 changes: 6 additions & 4 deletions externals/coda-oss/modules/c++/tiff/include/tiff/IFDEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@
*
*/


#pragma once
#ifndef __TIFF_IFD_ENTRY_H__
#define __TIFF_IFD_ENTRY_H__
#pragma once

#include <memory>
#include <string>
#include <vector>

#include <import/io.h>
#include "tiff/GenericType.h"
#include "sys/Conf.h"
#include "config/Exports.h"

#include "tiff/GenericType.h"

namespace tiff
{
Expand All @@ -47,7 +49,7 @@ namespace tiff
* functions for printing out the entry, reading and writing it to a
* file, and accessing the data.
*********************************************************************/
class IFDEntry : public io::Serializable
class CODA_OSS_API IFDEntry : public io::Serializable
{
public:
//! Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_IMAGE_READER_H__
#define __TIFF_IMAGE_READER_H__

#include <import/io.h>
#include <config/Exports.h>

#include "tiff/IFDEntry.h"
#include "tiff/IFD.h"
Expand All @@ -39,7 +40,7 @@ namespace tiff
* Reads a TIFF image and parses out the IFD. Contains functions for
* getting data from the image and retrieving the TIFF IFD.
*********************************************************************/
class ImageReader
class CODA_OSS_API ImageReader
{
public:
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_IMAGE_WRITER_H__
#define __TIFF_IMAGE_WRITER_H__

#include <import/io.h>
#include <config/Exports.h>

#include "tiff/Common.h"
#include "tiff/IFDEntry.h"
Expand All @@ -40,7 +41,7 @@ namespace tiff
* Writes a TIFF image to a stream. Contains functions for writing
* the image's IFD, and for putting data to a stream.
*********************************************************************/
class ImageWriter
class CODA_OSS_API ImageWriter
{
public:
//! The ideal tile size if a tiled file.
Expand Down
22 changes: 10 additions & 12 deletions externals/coda-oss/modules/c++/tiff/include/tiff/KnownTags.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_KNOWN_TAGS_H__
#define __TIFF_KNOWN_TAGS_H__

#include <map>
#include <string>
#include <import/mt.h>
#include <config/Exports.h>

#include "tiff/IFDEntry.h"

Expand All @@ -35,10 +36,8 @@ namespace tiff
/**
* This class is a container for known TIFF tags.
*/
class KnownTags
struct CODA_OSS_API KnownTags final
{
public:

KnownTags();

//! Destructor
Expand Down Expand Up @@ -71,14 +70,13 @@ class KnownTags
tiff::IFDEntry *operator[](const unsigned short tagKey);

//! Some common tags
static const char IMAGE_WIDTH[];
static const char IMAGE_LENGTH[];
static const char BITS_PER_SAMPLE[];
static const char COMPRESSION[];
static const char SAMPLES_PER_PIXEL[];
static const char PHOTOMETRIC_INTERPRETATION[];
static const char SAMPLE_FORMAT[];

static constexpr auto IMAGE_WIDTH = "ImageWidth";
static constexpr auto IMAGE_LENGTH = "ImageLength";
static constexpr auto BITS_PER_SAMPLE = "BitsPerSample";
static constexpr auto COMPRESSION = "Compression";
static constexpr auto SAMPLES_PER_PIXEL = "SamplesPerPixel";
static constexpr auto PHOTOMETRIC_INTERPRETATION = "PhotometricInterpretation";
static constexpr auto SAMPLE_FORMAT = "SampleFormat";

/**
*****************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_FILE_READER_H__
#define __TIFF_FILE_READER_H__

#include <string>
#include <vector>

#include <import/io.h>
#include <config/Exports.h>

#include "tiff/Header.h"
#include "tiff/ImageReader.h"
Expand All @@ -42,7 +44,7 @@ namespace tiff
* to access a specific image within the file, and to read data from
* a specific image in the file.
*********************************************************************/
struct FileReader
struct CODA_OSS_API FileReader
{
FileReader() = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_FILE_WRITER_H__
#define __TIFF_FILE_WRITER_H__

#include <string>
#include <vector>

#include <import/io.h>
#include <config/Exports.h>

#include "tiff/Header.h"
#include "tiff/ImageWriter.h"

Expand All @@ -41,7 +44,7 @@ namespace tiff
* to the same file. Contains function for manipulating each
* sub-image and for writing data.
*********************************************************************/
struct FileWriter
struct CODA_OSS_API FileWriter
{
//! Constructor
FileWriter() :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once
#ifndef __TIFF_TYPE_FACTORY_H__
#define __TIFF_TYPE_FACTORY_H__

#include "config/Exports.h"

#include "tiff/GenericType.h"

namespace tiff
Expand All @@ -38,7 +40,7 @@ namespace tiff
* assume a specific size for the data, see tiff::Const for the size
* of each TIFF type.
*********************************************************************/
class TypeFactory
class CODA_OSS_API TypeFactory final
{
public:
//! Default constructor
Expand Down
Loading

0 comments on commit 953e132

Please sign in to comment.