Skip to content

Commit

Permalink
Misc changes to accommodate luasocket
Browse files Browse the repository at this point in the history
  • Loading branch information
tanis2000 committed May 2, 2024
1 parent a67bdcf commit de8513f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,36 @@ if (APPLE)
if (IOS)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/sdl/include/configs/default)
include_directories(${PROJECT_SOURCE_DIR}/src/deps/lua/src)
include_directories(${PROJECT_SOURCE_DIR}/src/deps/luasocket/src)
else ()
include_directories(${CMAKE_SOURCE_DIR}/src/deps/sdl/include/configs/mac)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/glew/include)
# we're using lua instead of luajit on macos to be able to test with valgrind
#include_directories(${CMAKE_SOURCE_DIR}/src/deps/luajit/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/lua/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/luasocket/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/newton)
endif ()
endif ()

if (ANDROID)
include_directories(${PROJECT_SOURCE_DIR}/src/deps/luajit/src)
include_directories(${PROJECT_SOURCE_DIR}/src/deps/luasocket/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/sdl/include/configs/default)
endif ()

if (WIN32)
# we're using lua instead of luajit on macos to be able to test with valgrind
#include_directories(${PROJECT_SOURCE_DIR}/src/deps/luajit/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/lua/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/luasocket/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/sdl/include/configs/windows)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/glew/include)
endif ()

if (EMSCRIPTEN)
include_directories(${PROJECT_SOURCE_DIR}/src/deps/lua/src)
include_directories(${PROJECT_SOURCE_DIR}/src/deps/luasocket/src)
include_directories(${CMAKE_SOURCE_DIR}/src/deps/sdl/include/configs/default)
endif ()

Expand Down
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if (NOT EMSCRIPTEN)
else()
set(BINOCLE_STATIC_LIBS ${BINOCLE_STATIC_LIBS}
$<TARGET_OBJECTS:lua>
$<TARGET_OBJECTS:luasocket>
)
endif()

Expand All @@ -53,17 +54,20 @@ if (APPLE AND NOT IOS)
if (BINOCLE_LUAJIT)
set(BINOCLE_STATIC_LIBS ${BINOCLE_STATIC_LIBS}
$<TARGET_OBJECTS:libluajit>
$<TARGET_OBJECTS:luasocket>
)
else ()
set(BINOCLE_STATIC_LIBS ${BINOCLE_STATIC_LIBS}
$<TARGET_OBJECTS:lua>
$<TARGET_OBJECTS:luasocket>
)
endif()
endif()

if (IOS)
set(BINOCLE_STATIC_LIBS ${BINOCLE_STATIC_LIBS}
$<TARGET_OBJECTS:lua>
$<TARGET_OBJECTS:luasocket>
)
endif()

Expand All @@ -72,6 +76,7 @@ if (ANDROID)
$<TARGET_OBJECTS:vorbisidec>
#$<TARGET_OBJECTS:luajit-5.1>
$<TARGET_OBJECTS:lua>
$<TARGET_OBJECTS:luasocket>
)
endif()

Expand All @@ -81,6 +86,7 @@ if (MSVC)
# we're using lua instead of luajit on macos to be able to test with valgrind
#$<TARGET_OBJECTS:luajit-5.1>
$<TARGET_OBJECTS:lua>
$<TARGET_OBJECTS:luasocket>
)
if (BINOCLE_HTTP)
set(BINOCLE_STATIC_LIBS ${BINOCLE_STATIC_LIBS}
Expand Down
1 change: 1 addition & 0 deletions src/deps/luasocket/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
project(luasocket)

include_directories(.)
include_directories(../lua/src)

file(GLOB SOURCES
auxiliar.c
Expand Down

0 comments on commit de8513f

Please sign in to comment.