Mercurial > luasocket
comparison src/CMakeLists.txt @ 0:4b915342e2a8
LuaSocket 2.0.2 + CMake build description.
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Tue, 26 Aug 2008 18:40:01 -0700 |
parents | |
children | cf0892e34f45 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4b915342e2a8 |
---|---|
1 | |
2 | |
3 SET(luasocket_SOCKET | |
4 ${LuaSocket_SOURCE_DIR}/src/luasocket.c | |
5 ${LuaSocket_SOURCE_DIR}/src/inet.h | |
6 ${LuaSocket_SOURCE_DIR}/src/inet.c | |
7 ${LuaSocket_SOURCE_DIR}/src/tcp.h | |
8 ${LuaSocket_SOURCE_DIR}/src/tcp.c | |
9 ${LuaSocket_SOURCE_DIR}/src/udp.h | |
10 ${LuaSocket_SOURCE_DIR}/src/udp.c | |
11 ${LuaSocket_SOURCE_DIR}/src/except.h | |
12 ${LuaSocket_SOURCE_DIR}/src/except.c | |
13 ${LuaSocket_SOURCE_DIR}/src/select.h | |
14 ${LuaSocket_SOURCE_DIR}/src/select.c | |
15 ) | |
16 | |
17 SET(luasocket_UNIX | |
18 ${LuaSocket_SOURCE_DIR}/src/buffer.h | |
19 ${LuaSocket_SOURCE_DIR}/src/buffer.c | |
20 ${LuaSocket_SOURCE_DIR}/src/auxiliar.h | |
21 ${LuaSocket_SOURCE_DIR}/src/auxiliar.c | |
22 ${LuaSocket_SOURCE_DIR}/src/options.h | |
23 ${LuaSocket_SOURCE_DIR}/src/options.c | |
24 ${LuaSocket_SOURCE_DIR}/src/timeout.h | |
25 ${LuaSocket_SOURCE_DIR}/src/timeout.c | |
26 ${LuaSocket_SOURCE_DIR}/src/io.h | |
27 ${LuaSocket_SOURCE_DIR}/src/io.c | |
28 ${LuaSocket_SOURCE_DIR}/src/usocket.h | |
29 ${LuaSocket_SOURCE_DIR}/src/usocket.c | |
30 ${LuaSocket_SOURCE_DIR}/src/unix.h | |
31 ${LuaSocket_SOURCE_DIR}/src/unix.c | |
32 ) | |
33 | |
34 SET(luasocket_PUBLIC_HEADERS | |
35 ${LuaSocket_SOURCE_DIR}/src/luasocket.h | |
36 ) | |
37 | |
38 SET(luasocket_RESOURCE_FILES | |
39 ${LuaSocket_SOURCE_DIR}/src/http.lua | |
40 ${LuaSocket_SOURCE_DIR}/src/tp.lua | |
41 ${LuaSocket_SOURCE_DIR}/src/ftp.lua | |
42 ${LuaSocket_SOURCE_DIR}/src/smtp.lua | |
43 ${LuaSocket_SOURCE_DIR}/src/url.lua | |
44 ) | |
45 | |
46 SET(luasocketcommon_RESOURCE_FILES | |
47 ${LuaSocket_SOURCE_DIR}/src/ltn12.lua | |
48 ${LuaSocket_SOURCE_DIR}/src/socket.lua | |
49 ${LuaSocket_SOURCE_DIR}/src/mime.lua | |
50 ) | |
51 | |
52 IF(WANTS_BUILD_SHARED_LIBRARY) | |
53 ADD_LIBRARY(luasocket_library_dynamic MODULE ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET} ${luasocket_UNIX}) | |
54 SET_TARGET_PROPERTIES(luasocket_library_dynamic PROPERTIES | |
55 PREFIX "" | |
56 OUTPUT_NAME "core" | |
57 ) | |
58 TARGET_LINK_LIBRARIES(luasocket_library_dynamic ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS}) | |
59 SET_TARGET_PROPERTIES(luasocket_library_dynamic PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}") | |
60 ENDIF(WANTS_BUILD_SHARED_LIBRARY) | |
61 #IF(WANTS_BUILD_STATIC_LIBRARY) | |
62 ADD_LIBRARY(luasocket_library_static STATIC ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET} ${luasocket_UNIX}) | |
63 SET_TARGET_PROPERTIES(luasocket_library_static PROPERTIES OUTPUT_NAME "socket") | |
64 SET_TARGET_PROPERTIES(luasocket_library_static PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}") | |
65 TARGET_LINK_LIBRARIES(luasocket_library_static ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS}) | |
66 | |
67 #ENDIF(WANTS_BUILD_STATIC_LIBRARY) | |
68 | |
69 | |
70 INSTALL(TARGETS | |
71 luasocket_library_static | |
72 RUNTIME DESTINATION bin | |
73 LIBRARY DESTINATION lib | |
74 ARCHIVE DESTINATION lib | |
75 # ARCHIVE DESTINATION lib/static | |
76 ) | |
77 | |
78 IF(WANTS_BUILD_SHARED_LIBRARY) | |
79 INSTALL(TARGETS luasocket_library_dynamic DESTINATION ${LUAPACKAGE_CDIR}/socket) | |
80 ENDIF(WANTS_BUILD_SHARED_LIBRARY) | |
81 | |
82 INSTALL(FILES ${luasocket_PUBLIC_HEADERS} DESTINATION include) | |
83 | |
84 INSTALL(FILES ${luasocket_RESOURCE_FILES} DESTINATION ${LUAPACKAGE_LDIR}/socket) | |
85 INSTALL(FILES ${luasocketcommon_RESOURCE_FILES} DESTINATION ${LUAPACKAGE_LDIR}) | |
86 | |
87 ADD_SUBDIRECTORY(mime) |