Compiles succesfully on Windows with these changes

This commit is contained in:
Jacob Moen 2021-01-12 15:06:42 +01:00
parent f3d2772ec0
commit f7b7e07423

View File

@ -36,8 +36,8 @@ set(LUA_LIB_SRCS
add_library(lua_static STATIC ${LUA_LIB_SRCS}) add_library(lua_static STATIC ${LUA_LIB_SRCS})
set_target_properties(lua_static PROPERTIES OUTPUT_NAME "lua") set_target_properties(lua_static PROPERTIES OUTPUT_NAME "lua")
target_include_directories(lua_static PUBLIC "include") target_include_directories(lua_static PUBLIC "include")
set(LUA_DEFINITIONS)
if(UNIX) if(UNIX)
set(LUA_DEFINITIONS)
find_library(LIBM m) find_library(LIBM m)
#TODO: Redo this with find_package #TODO: Redo this with find_package
@ -51,13 +51,13 @@ if(UNIX)
target_compile_definitions(lua_static PRIVATE "LUA_USE_DLOPEN") target_compile_definitions(lua_static PRIVATE "LUA_USE_DLOPEN")
target_link_libraries(lua_static INTERFACE dl) target_link_libraries(lua_static INTERFACE dl)
endif() endif()
endif() target_compile_definitions(lua_static
target_compile_definitions(lua_static
PUBLIC ${LUA_DEFINITIONS} PUBLIC ${LUA_DEFINITIONS}
) )
target_compile_options(lua_static target_compile_options(lua_static
PRIVATE "-Wall" "-Wextra" PRIVATE "-Wall" "-Wextra"
) )
endif()
if(LUA_BUILD_BINARY) if(LUA_BUILD_BINARY)
include(CheckIncludeFile) include(CheckIncludeFile)