/*=========================================================================
 *
 *  Copyright NumFOCUS
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         https://www.apache.org/licenses/LICENSE-2.0.txt
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *=========================================================================*/

// This file is intended to be compiled and linked against a static or
// shared library CLP to (1) prevent the need to compile twice and
// (2) provide a mechanism to execute code before the entry point of module
// compiled either as the [executable only] or [executable + shared library].

#if defined(WIN32) && !defined(MODULE_STATIC)
#define MODULE_IMPORT __declspec(dllimport)
#else
#define MODULE_IMPORT
#endif

#include <itkFactoryRegistration.h>

extern "C" MODULE_IMPORT int ModuleEntryPoint(int, char* []);

int main(int argc, char** argv)
{
  itk::itkFactoryRegistration();
  return ModuleEntryPoint(argc, argv);
}
