diff --git a/binding.gyp b/binding.gyp index 5833877d..dbc64670 100644 --- a/binding.gyp +++ b/binding.gyp @@ -12,6 +12,7 @@ 'runtime%': 'node', 'ros_lib_dir': "= 23', { + 'cflags_cc': [ + '-std=c++20' + ] + } + ], + [ + 'node_major_version < 23', { + 'cflags_cc': [ + '-std=c++17' + ] + } + ] ] } ], @@ -72,8 +86,21 @@ 'defines': [ 'OS_WINDOWS' ], - 'cflags_cc': [ - '-std=c++20' + 'conditions': [ + [ + 'node_major_version >= 23', { + 'cflags_cc': [ + '-std=c++20' + ] + } + ], + [ + 'node_major_version < 23', { + 'cflags_cc': [ + '-std=c++17' + ] + } + ] ], 'include_dirs': [ './src/third_party/dlfcn-win32/',