Skip to content

Commit

Permalink
chore(linux): Rename KMN_CORE to KM_CORE_LIBRARY
Browse files Browse the repository at this point in the history
  • Loading branch information
ermshiperete committed Oct 19, 2023
1 parent b5c6f31 commit 2f073f7
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions common/include/kmx_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef KMX_WORD __attribute__((aligned(1))) KMX_WORD_unaligned;
#define KMX_WORD_unaligned KMX_WORD
#endif

#ifdef KMN_CORE
#ifdef KM_CORE_LIBRARY
// TODO: move this to a common namespace keyman::common::kmx_file or similar in the future
namespace km {
namespace kbp {
Expand Down Expand Up @@ -402,7 +402,7 @@ static_assert(sizeof(COMP_KEY) == KEYBOARDFILEKEY_SIZE, "COMP_KEY must be KEYBOA
static_assert(sizeof(COMP_GROUP) == KEYBOARDFILEGROUP_SIZE, "COMP_GROUP must be KEYBOARDFILEGROUP_SIZE bytes");
static_assert(sizeof(COMP_KEYBOARD) == KEYBOARDFILEHEADER_SIZE, "COMP_KEYBOARD must be KEYBOARDFILEHEADER_SIZE bytes");

#ifdef KMN_CORE
#ifdef KM_CORE_LIBRARY
} // namespace kmx
} // namespace kbp
} // namespace km
Expand Down
8 changes: 4 additions & 4 deletions core/include/keyman/keyman_core_api_bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@
#define _KM_CORE_EXT_SEPARATOR ('.')
#endif

#if defined KMN_CORE_STATIC
#if defined KM_CORE_LIBRARY_STATIC
#define KMN_API _kmn_tag_fn(_kmn_static_flag)
#define KMN_DEPRECATED_API _kmn_tag_fn(_kmn_deprecated_flag _kmn_and _kmn_static_flag)
#elif defined KMN_CORE_EXPORTING
#elif defined KM_CORE_LIBRARY_EXPORTING
#define KMN_API _kmn_tag_fn(_kmn_export_flag)
#define KMN_DEPRECATED_API _kmn_tag_fn(_kmn_deprecated_flag _kmn_and _kmn_export_flag)
#else
#define KMN_API _kmn_tag_fn(_kmn_import_flag)
#define KMN_DEPRECATED_API _kmn_tag_fn(_kmn_deprecated_flag _kmn_and _kmn_import_flag)
#endif

#ifndef KMN_CORE
#define KMN_CORE
#ifndef KM_CORE_LIBRARY
#define KM_CORE_LIBRARY
#endif
#ifndef USE_CHAR16_T
#define USE_CHAR16_T
Expand Down
6 changes: 3 additions & 3 deletions core/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ py = import('python')
python = py.find_installation()

# TODO: Shared includes may use namespaces, etc which need future tidyup.
# For now, we use KMN_CORE to inject the km::kbp::kmx namespace
defns += ['-DKMN_CORE']
# For now, we use KM_CORE_LIBRARY to inject the km::kbp::kmx namespace
defns += ['-DKM_CORE_LIBRARY']

# #define DEBUG when we are on a debug build
if get_option('buildtype') == 'debug'
Expand All @@ -36,4 +36,4 @@ endif
subdir('doc')
subdir('include')
subdir('src')
subdir('tests')
subdir('tests')
4 changes: 2 additions & 2 deletions core/src/kmx/kmx_file_validator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <kmx_file.h>

#ifdef KMN_CORE
#ifdef KM_CORE_LIBRARY
// TODO: move this to a common namespace keyman::common::kmx_file or similar in the future
namespace km {
namespace kbp {
Expand All @@ -27,7 +27,7 @@ class KMX_FileValidator : public COMP_KEYBOARD {
};


#ifdef KMN_CORE
#ifdef KM_CORE_LIBRARY
} // namespace kmx
} // namespace kbp
} // namespace km
Expand Down
4 changes: 2 additions & 2 deletions core/src/kmx/kmx_processevent.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

#pragma once

#ifndef KMN_CORE
#define KMN_CORE
#ifndef KM_CORE_LIBRARY
#define KM_CORE_LIBRARY
#endif
#ifndef USE_CHAR16_T
#define USE_CHAR16_T
Expand Down
4 changes: 2 additions & 2 deletions core/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version_res = []

# TODO: shouldn't this be defined only for dylib and not static lib?
defns += ['-DKMN_CORE_EXPORTING']
defns += ['-DKM_CORE_LIBRARY_EXPORTING']

if cpp_compiler.get_id() == 'msvc'
defns += ['-DUNICODE']
Expand All @@ -18,7 +18,7 @@ endif

if cpp_compiler.get_id() == 'emscripten'
# TODO: why do we need this defn here?
defns += ['-DKMN_CORE']
defns += ['-DKM_CORE_LIBRARY']
endif

# ICU4C is used for repertoire tests and core implementation
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/kmnkbd/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ else
warns = []
endif

local_defns = ['-DKMN_CORE_STATIC']
local_defns = ['-DKM_CORE_LIBRARY_STATIC']
tests = [
['context-api', 'context_api.cpp'],
['keyboard-api', 'keyboard_api.cpp'],
Expand Down
4 changes: 2 additions & 2 deletions core/tests/unit/kmnkbd/test_kmx_xstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Keyman Core - KMX Extended String unit tests
*/

#ifndef KMN_CORE
#define KMN_CORE
#ifndef KM_CORE_LIBRARY
#define KM_CORE_LIBRARY
#endif
#ifndef USE_CHAR16_T
#define USE_CHAR16_T
Expand Down
4 changes: 2 additions & 2 deletions windows/src/engine/keyman32/keymanengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#endif

// For keyman_core_api_bits.h
#ifndef KMN_CORE_STATIC
#define KMN_CORE_STATIC
#ifndef KM_CORE_LIBRARY_STATIC
#define KM_CORE_LIBRARY_STATIC
#endif
// For keyman_core_api_bits.h
#ifndef _WIN32
Expand Down

0 comments on commit 2f073f7

Please sign in to comment.