cmake: for linux
This commit is contained in:
parent
28cfa77ced
commit
214564516a
1 changed files with 6 additions and 5 deletions
|
@ -10,14 +10,10 @@ if(WIN32)
|
|||
add_definitions(-D_WIN32_WINNT=0x0600) ##should be this or the next two for working on XP
|
||||
#add_definitions(-D_WIN32_WINNT=0x0501)
|
||||
#add_definitions(-DLUASOCKET_INET_PTON)
|
||||
add_definitions("-DLUASOCKET_API=__declspec(dllexport)")
|
||||
add_definitions("-DMIME_API=__declspec(dllexport)")
|
||||
set(LUASOCKET_LINK wsock32 ws2_32 )
|
||||
set(POSTN dll)
|
||||
else()
|
||||
list(REMOVE_ITEM socket_src ./src/wsocket.c)
|
||||
add_definitions("-DLUASOCKET_API=__attribute__((visibility(default)))")
|
||||
add_definitions("-DMIME_API=__attribute__((visibility(default)))")
|
||||
set(POSTN so)
|
||||
endif(WIN32)
|
||||
|
||||
|
@ -25,7 +21,12 @@ endif(WIN32)
|
|||
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
|
||||
|
||||
add_definitions(-DLUASOCKET_DEBUG)
|
||||
add_definitions(-DLUA_BUILD_AS_DLL -DLUA_LIB -DLUASOCKET_EXPORTS)
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(-DLUA_BUILD_AS_DLL -DLUA_LIB)
|
||||
endif()
|
||||
|
||||
add_definitions( -DLUASOCKET_EXPORTS)
|
||||
|
||||
add_library(socket SHARED ${socket_src})
|
||||
ADD_LIBRARY(mime SHARED ./src/mime.c ./src/compat.c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue