annotate src/mime/CMakeLists.txt @ 1:cf0892e34f45

Resyncing with Git repo
author Eric Wing <ewing . public |-at-| gmail . com>
date Wed, 27 Aug 2008 22:44:22 -0700
parents 4b915342e2a8
children 9d9266316a91
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
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
19 IF(WANTS_BUILD_SHARED_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})
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
27 ENDIF(WANTS_BUILD_SHARED_LIBRARY)
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
28 #IF(WANTS_BUILD_STATIC_LIBRARY)
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
29 ADD_LIBRARY(luamime_library_static STATIC ${luasocket_MIME_PUBLIC_HEADERS} ${luasocket_MIME})
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
30 SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES OUTPUT_NAME "mime")
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
31 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
32 TARGET_LINK_LIBRARIES(luamime_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
33 #ENDIF(WANTS_BUILD_STATIC_LIBRARY)
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
34
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
35 INSTALL(TARGETS
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
36 luamime_library_static
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
37 RUNTIME DESTINATION bin
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
38 LIBRARY DESTINATION lib
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
39 ARCHIVE DESTINATION lib
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
40 # ARCHIVE DESTINATION lib/static
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
41 )
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
42
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
43 IF(WANTS_BUILD_SHARED_LIBRARY)
1
cf0892e34f45 Resyncing with Git repo
Eric Wing <ewing . public |-at-| gmail . com>
parents: 0
diff changeset
44 INSTALL(TARGETS luamime_library_module DESTINATION ${LUAPACKAGE_CDIR}/mime)
0
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
45 ENDIF(WANTS_BUILD_SHARED_LIBRARY)
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
46
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
47 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
48 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
49
4b915342e2a8 LuaSocket 2.0.2 + CMake build description.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
50