Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit 6c8c9b3

Browse files
author
kapec
committed
Build tweaks on Linux. Fixed samples to work on Linux.
1 parent 3f62572 commit 6c8c9b3

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ endif ()
2121

2222
if (APPLE)
2323
set (CMAKE_C_FLAGS "-bundle -undefined dynamic_lookup")
24+
elseif(UNIX)
25+
set (CMAKE_C_FLAGS "-fno-stack-protector")
2426
endif()
2527

2628
# Find LibFFI

FindFFI.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# FFI_LIBRARIES - The libraries needed to use LibFFI
66
# FFI_DEFINITIONS - Compiler switches required for using LibFFI
77

8-
find_path(FFI_INCLUDE_DIR ffi.h ffi/ffi.h )
8+
find_path(FFI_INCLUDE_DIR ffi.h ffi/ffi.h PATHS /usr/include/x86_64-linux-gnu/)
99
find_library(FFI_LIBRARY NAMES ffi libffi)
1010

1111
set(FFI_LIBRARIES ${FFI_LIBRARY} )

samples/gtk.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require "luarocks.require"
1+
22
require "alien"
33

44
local gtk,p,i=alien.load("/usr/lib/libgtk-x11-2.0.so.0"),"pointer","int"

samples/string_array.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
require "luarocks.require"
1+
22
require "alien"
33

4-
local glib = alien.load("/usr/lib/libglib-2.0.so.0")
4+
local glib = alien.load("/lib/libglib-2.0.so.0")
55
local v,p,i,s = "void","pointer","int","string"
66

77
glib.g_strsplit:types(p,s,s,i) -- string to array

0 commit comments

Comments
 (0)