From f7b7e0742386dacca9902dc0270741e93836b3dd Mon Sep 17 00:00:00 2001 From: Jacob Moen Date: Tue, 12 Jan 2021 15:06:42 +0100 Subject: [PATCH] Compiles succesfully on Windows with these changes --- lua-5.4.0/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua-5.4.0/CMakeLists.txt b/lua-5.4.0/CMakeLists.txt index 4b54f90..6524dc2 100644 --- a/lua-5.4.0/CMakeLists.txt +++ b/lua-5.4.0/CMakeLists.txt @@ -36,8 +36,8 @@ set(LUA_LIB_SRCS add_library(lua_static STATIC ${LUA_LIB_SRCS}) set_target_properties(lua_static PROPERTIES OUTPUT_NAME "lua") target_include_directories(lua_static PUBLIC "include") -set(LUA_DEFINITIONS) if(UNIX) + set(LUA_DEFINITIONS) find_library(LIBM m) #TODO: Redo this with find_package @@ -51,13 +51,13 @@ if(UNIX) target_compile_definitions(lua_static PRIVATE "LUA_USE_DLOPEN") target_link_libraries(lua_static INTERFACE dl) endif() + target_compile_definitions(lua_static + PUBLIC ${LUA_DEFINITIONS} + ) + target_compile_options(lua_static + PRIVATE "-Wall" "-Wextra" + ) endif() -target_compile_definitions(lua_static - PUBLIC ${LUA_DEFINITIONS} -) -target_compile_options(lua_static - PRIVATE "-Wall" "-Wextra" -) if(LUA_BUILD_BINARY) include(CheckIncludeFile)