annotate src/mime/CMakeLists.txt @ 2:9d9266316a91

Resync with Git
author Eric Wing <ewing . public |-at-| gmail . com>
date Fri, 29 Aug 2008 22:48:39 -0700
parents cf0892e34f45
children
rev   line source
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
1 # Ugh. I'm very irritated that the Luasocket people rename the modules to "core". (No prefix, .dll/.so suffix). This makes life difficult because I can't build the libraries directly with the name because there are two libraries (socket, mime) so the names conflict with each other.
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
2 # Furthermore, CMake doesn't offer good support for renaming TARGETS on install.
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
3 # The easiest way to work around this problem was create a new subdirectory just for the mime plugin and build directly to the name 'core'.
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
4
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
5
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
6 SET(luasocket_MIME
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
7 ${LuaSocket_SOURCE_DIR}/src/mime.c
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
8 )
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
9
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
10 SET(luasocket_MIME_PUBLIC_HEADERS
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
11 ${LuaSocket_SOURCE_DIR}/src/mime.h
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
12 )
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
13 SET(luamime_RESOURCE_FILES
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
14 # handled in above script
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
15 # ${LuaSocket_SOURCE_DIR}/src/mime.lua
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
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
18
2
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
19 IF(WANTS_BUILD_MODULE_LIBRARY)
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
20 ADD_LIBRARY(luamime_library_module MODULE ${luasocket_MIME_PUBLIC_HEADERS} ${luasocket_MIME})
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
21 SET_TARGET_PROPERTIES(luamime_library_module PROPERTIES
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
22 PREFIX ""
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
23 OUTPUT_NAME "core"
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
24 )
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
25 SET_TARGET_PROPERTIES(luamime_library_module PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}")
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
26 TARGET_LINK_LIBRARIES(luamime_library_module ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
2
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
27 ENDIF(WANTS_BUILD_MODULE_LIBRARY)
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
28
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
29 IF(WANTS_BUILD_STATIC_LIBRARY)
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
30 ADD_LIBRARY(luamime_library_static STATIC ${luasocket_MIME_PUBLIC_HEADERS} ${luasocket_MIME})
2
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
31 SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES OUTPUT_NAME "luasocketmime")
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
32 SET_TARGET_PROPERTIES(luamime_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
33 TARGET_LINK_LIBRARIES(luamime_library_static ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
2
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
34 ENDIF(WANTS_BUILD_STATIC_LIBRARY)
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
35
2
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
36 IF(WANTS_BUILD_STATIC_LIBRARY)
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
37 INSTALL(TARGETS
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
38 luamime_library_static
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
39 # RUNTIME DESTINATION bin
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
40 LIBRARY DESTINATION lib
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
41 ARCHIVE DESTINATION lib
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
42 # ARCHIVE DESTINATION lib/static
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
43 )
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
44 ENDIF(WANTS_BUILD_STATIC_LIBRARY)
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
45
2
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
46 IF(WANTS_BUILD_MODULE_LIBRARY)
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
47 INSTALL(TARGETS luamime_library_module DESTINATION ${LUAPACKAGE_CDIR}/mime)
2
9d9266316a91 Resync with Git
Eric Wing <ewing . public |-at-| gmail . com>
parents: 1
diff changeset
48 ENDIF(WANTS_BUILD_MODULE_LIBRARY)
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
49
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
50 INSTALL(FILES ${luamime_RESOURCE_FILES} DESTINATION ${LUAPACKAGE_LDIR}/mime)
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
51 INSTALL(FILES ${luasocket_MIME_PUBLIC_HEADERS} DESTINATION include)
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
52
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
53