diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-08-16 11:27:11 -0400 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2022-09-18 17:39:09 +0200 |
commit | b89608c6240b8e271e4f62a865449c947105a327 (patch) | |
tree | 1b72977bca27537ba3323bdfa8f9c9fda6e3f201 | |
parent | 6f5a68b7f7c664c547017d9bc59dc3b098cca02d (diff) | |
download | minetest-b89608c6240b8e271e4f62a865449c947105a327.tar.xz |
Compile bitop library as C++
-rw-r--r-- | lib/bitop/CMakeLists.txt | 2 | ||||
-rw-r--r-- | lib/bitop/bit.cpp (renamed from lib/bitop/bit.c) | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/bitop/CMakeLists.txt b/lib/bitop/CMakeLists.txt index 02e8a421d..80b627446 100644 --- a/lib/bitop/CMakeLists.txt +++ b/lib/bitop/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(bitop STATIC bit.c) +add_library(bitop STATIC bit.cpp) target_link_libraries(bitop) include_directories(${LUA_INCLUDE_DIR}) diff --git a/lib/bitop/bit.c b/lib/bitop/bit.cpp index f23c31a4c..39b53838f 100644 --- a/lib/bitop/bit.c +++ b/lib/bitop/bit.cpp @@ -26,12 +26,16 @@ ** [ MIT license: http://www.opensource.org/licenses/mit-license.php ] */ +extern "C" { #include "bit.h" +} #define LUA_BITOP_VERSION "1.0.2" #define LUA_LIB +extern "C" { #include "lauxlib.h" +} #ifdef _MSC_VER /* MSVC is stuck in the last century and doesn't have C99's stdint.h. */ |