Mercurial > luasocket
diff src/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 |
line wrap: on
line diff
--- a/src/CMakeLists.txt Wed Aug 27 22:44:22 2008 -0700 +++ b/src/CMakeLists.txt Fri Aug 29 22:48:39 2008 -0700 @@ -1,4 +1,15 @@ +IF(WIN32) + SET(luasocket_PLATFORM_SPECIFIC + ${LuaSocket_SOURCE_DIR}/src/wsocket.h + ${LuaSocket_SOURCE_DIR}/src/wsocket.c + ) +ELSEIF(UNIX) + SET(luasocket_PLATFORM_SPECIFIC + ${LuaSocket_SOURCE_DIR}/src/usocket.h + ${LuaSocket_SOURCE_DIR}/src/usocket.c + ) +ENDIF(WIN32) SET(luasocket_SOCKET ${LuaSocket_SOURCE_DIR}/src/luasocket.c @@ -12,29 +23,24 @@ ${LuaSocket_SOURCE_DIR}/src/except.c ${LuaSocket_SOURCE_DIR}/src/select.h ${LuaSocket_SOURCE_DIR}/src/select.c -) - -SET(luasocket_UNIX + ${LuaSocket_SOURCE_DIR}/src/timeout.h + ${LuaSocket_SOURCE_DIR}/src/timeout.c ${LuaSocket_SOURCE_DIR}/src/buffer.h ${LuaSocket_SOURCE_DIR}/src/buffer.c + ${LuaSocket_SOURCE_DIR}/src/io.h + ${LuaSocket_SOURCE_DIR}/src/io.c ${LuaSocket_SOURCE_DIR}/src/auxiliar.h ${LuaSocket_SOURCE_DIR}/src/auxiliar.c ${LuaSocket_SOURCE_DIR}/src/options.h ${LuaSocket_SOURCE_DIR}/src/options.c - ${LuaSocket_SOURCE_DIR}/src/timeout.h - ${LuaSocket_SOURCE_DIR}/src/timeout.c - ${LuaSocket_SOURCE_DIR}/src/io.h - ${LuaSocket_SOURCE_DIR}/src/io.c - ${LuaSocket_SOURCE_DIR}/src/usocket.h - ${LuaSocket_SOURCE_DIR}/src/usocket.c - ${LuaSocket_SOURCE_DIR}/src/unix.h - ${LuaSocket_SOURCE_DIR}/src/unix.c + ${luasocket_PLATFORM_SPECIFIC} ) SET(luasocket_PUBLIC_HEADERS ${LuaSocket_SOURCE_DIR}/src/luasocket.h ) + SET(luasocket_RESOURCE_FILES ${LuaSocket_SOURCE_DIR}/src/http.lua ${LuaSocket_SOURCE_DIR}/src/tp.lua @@ -49,35 +55,41 @@ ${LuaSocket_SOURCE_DIR}/src/mime.lua ) -IF(WANTS_BUILD_SHARED_LIBRARY) - ADD_LIBRARY(luasocket_library_module MODULE ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET} ${luasocket_UNIX}) +IF(WANTS_BUILD_MODULE_LIBRARY) + ADD_LIBRARY(luasocket_library_module MODULE ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET}) SET_TARGET_PROPERTIES(luasocket_library_module PROPERTIES PREFIX "" OUTPUT_NAME "core" ) TARGET_LINK_LIBRARIES(luasocket_library_module ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS}) SET_TARGET_PROPERTIES(luasocket_library_module PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}") -ENDIF(WANTS_BUILD_SHARED_LIBRARY) -#IF(WANTS_BUILD_STATIC_LIBRARY) - ADD_LIBRARY(luasocket_library_static STATIC ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET} ${luasocket_UNIX}) - SET_TARGET_PROPERTIES(luasocket_library_static PROPERTIES OUTPUT_NAME "socket") + +ENDIF(WANTS_BUILD_MODULE_LIBRARY) + +IF(WANTS_BUILD_STATIC_LIBRARY) + ADD_LIBRARY(luasocket_library_static STATIC ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET}) + SET_TARGET_PROPERTIES(luasocket_library_static PROPERTIES OUTPUT_NAME "luasocket") SET_TARGET_PROPERTIES(luasocket_library_static PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}") TARGET_LINK_LIBRARIES(luasocket_library_static ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS}) -#ENDIF(WANTS_BUILD_STATIC_LIBRARY) + +ENDIF(WANTS_BUILD_STATIC_LIBRARY) -INSTALL(TARGETS - luasocket_library_static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - # ARCHIVE DESTINATION lib/static -) +IF(WANTS_BUILD_STATIC_LIBRARY) + INSTALL(TARGETS + luasocket_library_static + # RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + # ARCHIVE DESTINATION lib/static + ) -IF(WANTS_BUILD_SHARED_LIBRARY) +ENDIF(WANTS_BUILD_STATIC_LIBRARY) + +IF(WANTS_BUILD_MODULE_LIBRARY) INSTALL(TARGETS luasocket_library_module DESTINATION ${LUAPACKAGE_CDIR}/socket) -ENDIF(WANTS_BUILD_SHARED_LIBRARY) +ENDIF(WANTS_BUILD_MODULE_LIBRARY) INSTALL(FILES ${luasocket_PUBLIC_HEADERS} DESTINATION include) @@ -85,3 +97,8 @@ INSTALL(FILES ${luasocketcommon_RESOURCE_FILES} DESTINATION ${LUAPACKAGE_LDIR}) ADD_SUBDIRECTORY(mime) +IF(UNIX) + ADD_SUBDIRECTORY(unix) +ENDIF(UNIX) + +