From 49e06ca4013da04add8a0f809e57ce63ee1e21af Mon Sep 17 00:00:00 2001 From: Aleksey Komarov Date: Tue, 22 May 2018 08:04:58 +0300 Subject: [PATCH] fix building luabin with mingw --- CMakeLists.txt | 2 ++ Externals/luabind | 2 +- src/Common/PlatformLinux.inl | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58bb63dcd9f..ab576e0004a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,14 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17") add_definitions(-D_MT -D_CPPUNWIND -DPURE_DYNAMIC_CAST -DDECLARE_SPECIALIZATION -DM_NOSTDCONTAINERS_EXT -DUSE_OGL) find_package(Lua51 REQUIRED) +if (NOT WIN32) find_package(OpenSSL REQUIRED) find_package(Theora REQUIRED) find_package(OGG REQUIRED) find_package(SDL2 REQUIRED) find_package(LZO REQUIRED) find_package(JPEG REQUIRED) +endif() include_directories(${LUA_INCLUDE_DIR}) include_directories(${CMAKE_SOURCE_DIR} {CMAKE_SOURCE_DIR}/Common ${CMAKE_SOURCE_DIR}/Externals ${CMAKE_SOURCE_DIR}/Externals/gli/external/glm ${CMAKE_SOURCE_DIR}/../sdk/include/loki) diff --git a/Externals/luabind b/Externals/luabind index 933e2174232..abc2f76abe2 160000 --- a/Externals/luabind +++ b/Externals/luabind @@ -1 +1 @@ -Subproject commit 933e21742327a2ad7bffd77b901a5a7bd06d9fd7 +Subproject commit abc2f76abe245086bf80f71a05342bf262effebf diff --git a/src/Common/PlatformLinux.inl b/src/Common/PlatformLinux.inl index d33f1b11364..da48e2ce9a3 100644 --- a/src/Common/PlatformLinux.inl +++ b/src/Common/PlatformLinux.inl @@ -248,3 +248,7 @@ typedef dirent DirEntryType; fprintf(stderr, "STUBBED: %s in %s, line %d.\n", txt, __FILE__, __LINE__); \ } \ } while (0) + +#if __EXCEPTIONS +#define _CPPUNWIND 1 +#endif