annotate lua/luadyncall/src/CMakeLists.txt @ 53:6387d39ecce2

- version bumps
author Tassilo Philipp
date Fri, 22 Jan 2021 15:18:56 +0100
parents 0cfcc391201f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 # use lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 include_directories(${LUA_INCLUDE_DIR})
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 # Lua Module Names:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 set(CMAKE_SHARED_MODULE_PREFIX "")
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 # DynLoad and DynCall:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 include_directories( ${DynCall_SOURCE_DIR}/dyncall ${DynCall_SOURCE_DIR}/dynload ${DynCall_SOURCE_DIR}/dyncallback )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 # Fix arch x86_64: force PIC always (even in static libraries)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 add_definitions("-fPIC")
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 endif()
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 add_library(smartptr MODULE smartptr.c)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 add_library(intutils MODULE intutils.cpp)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 add_library(ldynload MODULE ldynload.c)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 add_library(ldyncall MODULE ldyncall.c)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 add_library(ldynguess MODULE ldynguess.c)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 add_library(ldynstruct MODULE ldynstruct.c)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 add_library(ldyntype MODULE ldyntype.c)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23 add_library(larray MODULE larray.c dyntype.c)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 target_link_libraries(ldynload dynload_s)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26 target_link_libraries(ldyncall dyncall_s)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 install(TARGETS
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 ldynload smartptr
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 ldyncall
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 larray
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 intutils
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 ldynguess
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 # ldynstruct ldyntype
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 LIBRARY DESTINATION lib/lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38 install(FILES
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 dynload.lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40 dyncall.lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41 dynport.lua path.lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42 array.lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 # dynstruct.lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 # dyntype.lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 DESTINATION lib/lua
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 if(APPLE)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 set(CMAKE_MODULE_LINKER_FLAGS "-bundle -undefined dynamic_lookup")
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 # build cocoautil library on mac os x
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 add_library(cocoautil MODULE cocoautil.m)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 endif()
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53