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