Skip to content

Commit 4d6df75

Browse files
scope rtti
1 parent 27934d6 commit 4d6df75

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

core/common/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939

4040
if (RTTI)
4141
if (NOT MSVC)
42-
target_compile_options(nakama-sdk-core-common PRIVATE "-frtti")
42+
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/NLogSinkInterface.cpp"
43+
PROPERTIES COMPILE_OPTIONS "-frtti")
4344
else()
44-
target_compile_options(nakama-sdk-core-common PRIVATE "/GR")
45+
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/NLogSinkInterface.cpp"
46+
PROPERTIES COMPILE_OPTIONS "/GR")
4547
endif()
4648
endif()
4749

interface/include/nakama-cpp/NExport.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,13 @@
2121
// That's where FORCE_DLL_IMPORT_EXPORT might be defined on some platforms
2222
#include <nakama-cpp/config.h>
2323

24-
#if defined FORCE_DLL_VISIBILITY
25-
#ifdef NAKAMA_SHARED_LIBRARY_EXPORTS
26-
#define NAKAMA_API __attribute__((visibility("default")))
27-
#else
28-
#define NAKAMA_API
29-
#endif
30-
#elif defined _WIN32 || defined __CYGWIN__ || defined FORCE_DLL_IMPORT_EXPORT
24+
#if defined _WIN32 || defined __CYGWIN__ || defined FORCE_DLL_IMPORT_EXPORT
3125
#ifdef NAKAMA_SHARED_LIBRARY_EXPORTS
3226
#define NAKAMA_API __declspec(dllexport)
3327
#else
3428
#define NAKAMA_API __declspec(dllimport)
3529
#endif
36-
#elif __GNUC__ >= 4
30+
#elif __GNUC__ >= 4 || defined FORCE_DLL_VISIBILITY
3731
#ifdef NAKAMA_SHARED_LIBRARY_EXPORTS
3832
#define NAKAMA_API __attribute__((visibility("default")))
3933
#else

0 commit comments

Comments
 (0)