diff --git a/.clang-format b/.clang-format index a98456fe..10ca177b 100644 --- a/.clang-format +++ b/.clang-format @@ -20,7 +20,7 @@ NamespaceIndentation: All # Includes #IncludeBlocks: Regroup IncludeCategories: - - Regex: '^(<|")(common.hpp|strings.hpp|version.hpp|obs.h)("|>)' + - Regex: '^(<|")(config.hpp|common.hpp|strings.hpp|version.hpp|obs.h)("|>)' Priority: 100 - Regex: '^ // Common Plugin includes +#include "config.hpp" #include "strings.hpp" #include "version.hpp" #include "util/util-math.hpp" diff --git a/templates/config.hpp.in b/templates/config.hpp.in new file mode 100644 index 00000000..fe20407e --- /dev/null +++ b/templates/config.hpp.in @@ -0,0 +1,30 @@ +/* + * Modern effects for a modern Streamer + * Copyright (C) 2020 Michael Fabian Dirks + * + * This program 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 2 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define D_PLATFORM "@CMAKE_SYSTEM_NAME@" +#cmakedefine D_PLATFORM_WINDOWS +#cmakedefine D_PLATFORM_LINUX +#cmakedefine D_PLATFORM_MAC + +#define D_PLATFORM_BITS @BITS@ +#if D_PLATFORM_BITS == 64 +#define D_PLATFORM_64BIT +#else +#define D_PLATFORM_32BIT +#endif