mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Refactor LOOT_API definition block
Into a separate header to avoid repetition.
This commit is contained in:
@@ -217,6 +217,7 @@ set (LOOT_HEADERS "${CMAKE_SOURCE_DIR}/src/backend/app/loot_paths.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/backend/helpers/language.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/backend/helpers/version.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/backend/helpers/yaml_set_helpers.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/api_decorator.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/error.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/game_type.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/language_code.h"
|
||||
@@ -273,6 +274,7 @@ set (LOOT_API_SRC "${CMAKE_BINARY_DIR}/generated/loot_version.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/api/api_database.cpp")
|
||||
|
||||
set (LOOT_API_HEADERS "${CMAKE_SOURCE_DIR}/include/loot/api.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/api_decorator.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/database_interface.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/error.h"
|
||||
"${CMAKE_SOURCE_DIR}/include/loot/game_type.h"
|
||||
|
||||
+1
-16
@@ -32,27 +32,12 @@
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "loot/api_decorator.h"
|
||||
#include "loot/database_interface.h"
|
||||
#include "loot/error.h"
|
||||
#include "loot/game_type.h"
|
||||
#include "loot/loot_version.h"
|
||||
|
||||
/* set up dll import/export decorators
|
||||
when compiling the dll on windows, ensure LOOT_EXPORT is defined. clients
|
||||
that use this header do not need to define anything to import the symbols
|
||||
properly. */
|
||||
#if defined(_WIN32)
|
||||
# ifdef LOOT_STATIC
|
||||
# define LOOT_API
|
||||
# elif defined LOOT_EXPORT
|
||||
# define LOOT_API __declspec(dllexport)
|
||||
# else
|
||||
# define LOOT_API __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define LOOT_API
|
||||
#endif
|
||||
|
||||
namespace loot {
|
||||
/**@}*/
|
||||
/**********************************************************************//**
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* LOOT
|
||||
|
||||
A load order optimisation tool for Oblivion, Skyrim, Fallout 3 and
|
||||
Fallout: New Vegas.
|
||||
|
||||
Copyright (C) 2013-2016 WrinklyNinja
|
||||
|
||||
This file is part of LOOT.
|
||||
|
||||
LOOT is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
LOOT 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LOOT. If not, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LOOT_API_DECORATOR
|
||||
#define LOOT_API_DECORATOR
|
||||
|
||||
/* set up dll import/export decorators
|
||||
when compiling the dll on windows, ensure LOOT_EXPORT is defined. clients
|
||||
that use this header do not need to define anything to import the symbols
|
||||
properly. */
|
||||
#if defined(_WIN32)
|
||||
# ifdef LOOT_STATIC
|
||||
# define LOOT_API
|
||||
# elif defined LOOT_EXPORT
|
||||
# define LOOT_API __declspec(dllexport)
|
||||
# else
|
||||
# define LOOT_API __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define LOOT_API
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -28,22 +28,6 @@
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
/* set up dll import/export decorators
|
||||
when compiling the dll on windows, ensure LOOT_EXPORT is defined. clients
|
||||
that use this header do not need to define anything to import the symbols
|
||||
properly. */
|
||||
#if defined(_WIN32)
|
||||
# ifdef LOOT_STATIC
|
||||
# define LOOT_API
|
||||
# elif defined LOOT_EXPORT
|
||||
# define LOOT_API __declspec(dllexport)
|
||||
# else
|
||||
# define LOOT_API __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define LOOT_API
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Contains the Error class used for some exceptions thrown.
|
||||
|
||||
@@ -27,21 +27,7 @@ along with LOOT. If not, see
|
||||
|
||||
#include <string>
|
||||
|
||||
/* set up dll import/export decorators
|
||||
when compiling the dll on windows, ensure LOOT_EXPORT is defined. clients
|
||||
that use this header do not need to define anything to import the symbols
|
||||
properly. */
|
||||
#if defined(_WIN32)
|
||||
# ifdef LOOT_STATIC
|
||||
# define LOOT_API
|
||||
# elif defined LOOT_EXPORT
|
||||
# define LOOT_API __declspec(dllexport)
|
||||
# else
|
||||
# define LOOT_API __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define LOOT_API
|
||||
#endif
|
||||
#include "loot/api_decorator.h"
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
||||
Reference in New Issue
Block a user