changeset 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
files CMakeLists.txt src/CMakeLists.txt src/mime/CMakeLists.txt
diffstat 3 files changed, 24 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Tue Aug 26 18:40:01 2008 -0700
+++ b/CMakeLists.txt	Wed Aug 27 22:44:22 2008 -0700
@@ -1,13 +1,14 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
 PROJECT(LuaSocket)
 
 IF(USING_LUA_MULTI_SET)
 	IF(NOT LUA_LIBRARIES)
-		IF(lua_library_dynamic)
-			SET(LUA_LIBRARIES lua_library_dynamic)
-		ELSE(lua_library_dynamic)
+		IF(lua_library_module)
+			SET(LUA_LIBRARIES lua_library_module)
+		ELSE(lua_library_module)
 			SET(LUA_LIBRARIES lua_library_static)
-		ENDIF(lua_library_dynamic)
+		ENDIF(lua_library_module)
 	ENDIF(NOT LUA_LIBRARIES)
 	IF(NOT LUA_INCLUDE_DIR)
 		SET(LUA_INCLUDE_DIR ${Lua_SOURCE_DIR}/src)
@@ -18,7 +19,6 @@
 
 OPTION(WANTS_BUILD_SHARED_LIBRARY "Set to ON to build dynamic library." ON)
 #OPTION(WANTS_BUILD_STATIC_LIBRARY "Set to ON to build static library." ON)
-OPTION(WANTS_BUILD_FRAMEWORK "Set to ON to build framework instead of dylib. Only valid if BUILD_SHARED_LIBRARY is ON an is OS X." ON)
 
 SET(LUAPACKAGE_CDIR "lib/lua/5.1" CACHE STRING "Path for Lua packaged platform specific things.")
 SET(LUAPACKAGE_LDIR "share/lua/5.1" CACHE STRING "Path for Lua packages platform independent things.")
@@ -37,7 +37,7 @@
 
 
 #IF(WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK)
-#	SET_TARGET_PROPERTIES(luasocket_library_dynamic PROPERTIES
+#	SET_TARGET_PROPERTIES(luasocket_library_module PROPERTIES
 #		FRAMEWORK TRUE
 #		# FRAMEWORK_VERSION 5.1
 #		#  PRIVATE_HEADER "fooPrivate.h;fooBoth.h"
@@ -48,7 +48,7 @@
 #	)
 #ENDIF(WANTS_BUILD_SHARED_LIBRARY AND WANTS_BUILD_FRAMEWORK)
 
-#SET_TARGET_PROPERTIES(luasocket_library_dynamic PROPERTIES
+#SET_TARGET_PROPERTIES(luasocket_library_module PROPERTIES
 #	PUBLIC_HEADER "${luasocket_PUBLIC_HEADERS}"
 #	RESOURCE "${luasocket_RESOURCE_FILES}"
 #)	
--- a/src/CMakeLists.txt	Tue Aug 26 18:40:01 2008 -0700
+++ b/src/CMakeLists.txt	Wed Aug 27 22:44:22 2008 -0700
@@ -50,13 +50,13 @@
 )
 
 IF(WANTS_BUILD_SHARED_LIBRARY)
-	ADD_LIBRARY(luasocket_library_dynamic MODULE ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET} ${luasocket_UNIX})
-	SET_TARGET_PROPERTIES(luasocket_library_dynamic PROPERTIES 
+	ADD_LIBRARY(luasocket_library_module MODULE ${luasocket_PUBLIC_HEADERS} ${luasocket_SOCKET} ${luasocket_UNIX})
+	SET_TARGET_PROPERTIES(luasocket_library_module PROPERTIES 
 		PREFIX ""
 		OUTPUT_NAME "core"
 	)
-	TARGET_LINK_LIBRARIES(luasocket_library_dynamic ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
-	SET_TARGET_PROPERTIES(luasocket_library_dynamic PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}")
+	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})
@@ -76,7 +76,7 @@
 )
 
 IF(WANTS_BUILD_SHARED_LIBRARY)
-	INSTALL(TARGETS luasocket_library_dynamic DESTINATION ${LUAPACKAGE_CDIR}/socket)
+	INSTALL(TARGETS luasocket_library_module DESTINATION ${LUAPACKAGE_CDIR}/socket)
 ENDIF(WANTS_BUILD_SHARED_LIBRARY)
 
 INSTALL(FILES ${luasocket_PUBLIC_HEADERS} DESTINATION include)
--- a/src/mime/CMakeLists.txt	Tue Aug 26 18:40:01 2008 -0700
+++ b/src/mime/CMakeLists.txt	Wed Aug 27 22:44:22 2008 -0700
@@ -4,25 +4,29 @@
 
 
 SET(luasocket_MIME
-		${LuaSocket_SOURCE_DIR}/src/mime.h
 		${LuaSocket_SOURCE_DIR}/src/mime.c
 )
+
+SET(luasocket_MIME_PUBLIC_HEADERS
+		${LuaSocket_SOURCE_DIR}/src/mime.h
+)
 SET(luamime_RESOURCE_FILES
+		# handled in above script
 #		${LuaSocket_SOURCE_DIR}/src/mime.lua
 )
 
 
 IF(WANTS_BUILD_SHARED_LIBRARY)
-	ADD_LIBRARY(luamime_library_dynamic MODULE ${luasocket_PUBLIC_HEADERS} ${luasocket_MIME})
-	SET_TARGET_PROPERTIES(luamime_library_dynamic PROPERTIES
+	ADD_LIBRARY(luamime_library_module MODULE ${luasocket_MIME_PUBLIC_HEADERS} ${luasocket_MIME})
+	SET_TARGET_PROPERTIES(luamime_library_module PROPERTIES
 		PREFIX ""
 		OUTPUT_NAME "core"
 	)
-	SET_TARGET_PROPERTIES(luamime_library_dynamic PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}")
-	TARGET_LINK_LIBRARIES(luamime_library_dynamic ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
+	SET_TARGET_PROPERTIES(luamime_library_module PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}")
+	TARGET_LINK_LIBRARIES(luamime_library_module ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
 ENDIF(WANTS_BUILD_SHARED_LIBRARY)
 #IF(WANTS_BUILD_STATIC_LIBRARY)
-	ADD_LIBRARY(luamime_library_static STATIC ${luasocket_PUBLIC_HEADERS} ${luasocket_MIME})
+	ADD_LIBRARY(luamime_library_static STATIC ${luasocket_MIME_PUBLIC_HEADERS} ${luasocket_MIME})
 	SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES OUTPUT_NAME "mime")
 	SET_TARGET_PROPERTIES(luamime_library_static PROPERTIES COMPILE_FLAGS "${LUASOCKET_C_FLAGS}")
 	TARGET_LINK_LIBRARIES(luamime_library_static ${LUA_LIBRARIES} ${LUASOCKET_LINK_FLAGS})
@@ -37,9 +41,10 @@
 )
 
 IF(WANTS_BUILD_SHARED_LIBRARY)
-	INSTALL(TARGETS luamime_library_dynamic DESTINATION ${LUAPACKAGE_CDIR}/mime)
+	INSTALL(TARGETS luamime_library_module DESTINATION ${LUAPACKAGE_CDIR}/mime)
 ENDIF(WANTS_BUILD_SHARED_LIBRARY)
 
 INSTALL(FILES ${luamime_RESOURCE_FILES} DESTINATION ${LUAPACKAGE_LDIR}/mime)
+INSTALL(FILES ${luasocket_MIME_PUBLIC_HEADERS} DESTINATION include)