Merge pull request #5 from jacmoe/issue/4-windows-build

Compiles succesfully on Windows with these changes
This commit is contained in:
Walter Schell 2021-01-16 09:40:54 -05:00 committed by GitHub
commit 7a1775e2e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)