comparison 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
comparison
equal deleted inserted replaced
0:4b915342e2a8 1:cf0892e34f45
2 # Furthermore, CMake doesn't offer good support for renaming TARGETS on install. 2 # Furthermore, CMake doesn't offer good support for renaming TARGETS on install.
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'. 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'.
4 4
5 5
6 SET(luasocket_MIME 6 SET(luasocket_MIME
7 ${LuaSocket_SOURCE_DIR}/src/mime.h
8 ${LuaSocket_SOURCE_DIR}/src/mime.c 7 ${LuaSocket_SOURCE_DIR}/src/mime.c
9 ) 8 )
9
10 SET(luasocket_MIME_PUBLIC_HEADERS
11 ${LuaSocket_SOURCE_DIR}/src/mime.h
12 )
10 SET(luamime_RESOURCE_FILES 13 SET(luamime_RESOURCE_FILES
14 # handled in above script
11 # ${LuaSocket_SOURCE_DIR}/src/mime.lua 15 # ${LuaSocket_SOURCE_DIR}/src/mime.lua
12 ) 16 )
13 17
14 18
15 IF(WANTS_BUILD_SHARED_LIBRARY) 19 IF(WANTS_BUILD_SHARED_LIBRARY)
16 ADD_LIBRARY(luamime_library_dynamic MODULE ${luasocket_PUBLIC_HEADERS} ${luasocket_MIME}) 20 ADD_LIBRARY(luamime_library_module MODULE ${luasocket_MIME_PUBLIC_HEADERS} ${luasocket_MIME})
17 SET_TARGET_PROPERTIES(luamime_library_dynamic PROPERTIES 21 SET_TARGET_PROPERTIES(luamime_library_module PROPERTIES
18 PREFIX "" 22 PREFIX ""
19 OUTPUT_NAME "core" 23 OUTPUT_NAME "core"
20 ) 24 )
21 SET_TARGET_PROPERTIES(luamime_library_dynamic PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}") 25 SET_TARGET_PROPERTIES(luamime_library_module PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}")
22 TARGET_LINK_LIBRARIES(luamime_library_dynamic ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS}) 26 TARGET_LINK_LIBRARIES(luamime_library_module ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
23 ENDIF(WANTS_BUILD_SHARED_LIBRARY) 27 ENDIF(WANTS_BUILD_SHARED_LIBRARY)
24 #IF(WANTS_BUILD_STATIC_LIBRARY) 28 #IF(WANTS_BUILD_STATIC_LIBRARY)
25 ADD_LIBRARY(luamime_library_static STATIC ${luasocket_PUBLIC_HEADERS} ${luasocket_MIME}) 29 ADD_LIBRARY(luamime_library_static STATIC ${luasocket_MIME_PUBLIC_HEADERS} ${luasocket_MIME})
26 SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES OUTPUT_NAME "mime") 30 SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES OUTPUT_NAME "mime")
27 SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}") 31 SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}")
28 TARGET_LINK_LIBRARIES(luamime_library_static ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS}) 32 TARGET_LINK_LIBRARIES(luamime_library_static ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
29 #ENDIF(WANTS_BUILD_STATIC_LIBRARY) 33 #ENDIF(WANTS_BUILD_STATIC_LIBRARY)
30 34
35 ARCHIVE DESTINATION lib 39 ARCHIVE DESTINATION lib
36 # ARCHIVE DESTINATION lib/static 40 # ARCHIVE DESTINATION lib/static
37 ) 41 )
38 42
39 IF(WANTS_BUILD_SHARED_LIBRARY) 43 IF(WANTS_BUILD_SHARED_LIBRARY)
40 INSTALL(TARGETS luamime_library_dynamic DESTINATION ${LUAPACKAGE_CDIR}/mime) 44 INSTALL(TARGETS luamime_library_module DESTINATION ${LUAPACKAGE_CDIR}/mime)
41 ENDIF(WANTS_BUILD_SHARED_LIBRARY) 45 ENDIF(WANTS_BUILD_SHARED_LIBRARY)
42 46
43 INSTALL(FILES ${luamime_RESOURCE_FILES} DESTINATION ${LUAPACKAGE_LDIR}/mime) 47 INSTALL(FILES ${luamime_RESOURCE_FILES} DESTINATION ${LUAPACKAGE_LDIR}/mime)
48 INSTALL(FILES ${luasocket_MIME_PUBLIC_HEADERS} DESTINATION include)
44 49
45 50