File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ option(WITH_GRPC_CLIENT "Build gRPC Client" OFF)
1919
2020option (BUILD_TESTING "Build tests" OFF )
2121
22+ option (RTTI "Enable RTTI on classes which could be inherited by app" ON )
23+
2224if (WITH_WS_WSLAY)
2325 list (APPEND VCPKG_MANIFEST_FEATURES "wslay" )
2426endif ()
Original file line number Diff line number Diff line change @@ -24,10 +24,16 @@ file(
2424
2525add_library (nakama-sdk-core-misc OBJECT ${_source_list} )
2626add_library (nakama::sdk-core-misc ALIAS nakama-sdk-core-misc)
27+ target_link_libraries (nakama-sdk-core-misc PRIVATE nakama::sdk-interface )
2728
28- target_link_libraries (nakama-sdk-core-misc
29- PUBLIC nakama::sdk-interface
30- )
29+ if (RTTI)
30+ # enable RTTI flag only on sources with classes inheritable by app
31+ if (NOT MSVC )
32+ target_compile_options (nakama-sdk-core-misc PRIVATE "-frtti" )
33+ else ()
34+ target_compile_options (nakama-sdk-core-misc PRIVATE "/GR" )
35+ endif ()
36+ endif ()
3137
3238if (ANDROID)
3339 target_link_libraries (nakama-sdk-core-misc PRIVATE log )
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- #include " nakama-cpp/log/NConsoleLogSink.h"
17+ #include < nakama-cpp/log/NConsoleLogSink.h>
1818#include < iostream>
1919#ifdef __ANDROID__
2020#include < android/log.h>
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- #include " nakama-cpp/log/NLogger.h"
18- #include " nakama-cpp/log/NConsoleLogSink.h"
17+ #include < nakama-cpp/log/NLogger.h>
18+ #include < nakama-cpp/log/NConsoleLogSink.h>
1919
2020namespace Nakama {
2121
You can’t perform that action at this time.
0 commit comments